All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use
@ 2013-04-05  1:42 Otavio Salvador
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 2/5] xf86-video-imxfb-vivante: Add missing dependency of virtual/xserver Otavio Salvador
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05  1:42 UTC (permalink / raw)
  To: meta-freescale Mailing List; +Cc: Otavio Salvador

As we now provide a single backend there're no need for full set of
packages and the binaries can use the generic names so we don't need
to rework other applications and/or libraries to link properly.

The xf86-video-imxfb-vivante needs also to be change as the libraries
are now under generic name so we remove the backend suffix from
libraries so the LDFLAGS ought to be removed for the build to succeed.

Change-Id: I73cc9986babe8bb4fb0c05117c6b3d93b0470949
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 86 ++++++++--------------
 .../xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb  |  3 +-
 2 files changed, 32 insertions(+), 57 deletions(-)

diff --git a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
index e8e491e..44f6fc9 100644
--- a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
+++ b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
@@ -17,16 +17,6 @@ SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
            file://fix-conflicting-TLS-definition.patch \
           "
 
-GPU_XLIBS = "libegl-x11-mx6 libegl-x11-mx6-dev libegl-x11-mx6-dbg \
-	libgal-x11-mx6 libgal-x11-mx6-dev libgal-x11-mx6-dbg \
-	libvivante-x11-mx6 libvivante-x11-mx6-dev libvivante-x11-mx6-dbg \
-	"
-
-GPU_DFBLIBS = "libegl-dfb-mx6 libegl-dfb-mx6-dev libegl-dfb-mx6-dbg \
-	libgal-dfb-mx6 libgal-dfb-mx6-dev libgal-dfb-mx6-dbg \
-	libvivante-dfb-mx6 libvivante-dfb-mx6-dev libvivante-dfb-mx6-dbg \
-	"
-
 PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
 	libgles-mx6 libgles-mx6-dev libgles-mx6-dbg \
 	libgles2-mx6 libgles2-mx6-dev libgles2-mx6-dbg \
@@ -34,12 +24,10 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
 	libopencl-mx6 libopencl-mx6-dev libopencl-mx6-dbg \
 	libopenvg-mx6 libopenvg-mx6-dev libopenvg-mx6-dbg \
 	libvdk-mx6 libvdk-mx6-dev libvdk-mx6-dbg \
-	libegl-fb-mx6 libegl-fb-mx6-dev libegl-fb-mx6-dbg \
-	libgal-fb-mx6 libgal-fb-mx6-dev libgal-fb-mx6-dbg \
-	libvivante-fb-mx6 libvivante-fb-mx6-dev libvivante-fb-mx6-dbg \
-	${@base_contains("DISTRO_FEATURES", "x11", "${GPU_XLIBS}", "", d)} \
-	${@base_contains("DISTRO_FEATURES", "directfb", "${GPU_DFBLIBS}", "", d)} \
-	"
+	libegl-mx6 libegl-mx6-dev libegl-mx6-dbg \
+	libgal-mx6 libgal-mx6-dev libgal-mx6-dbg \
+	libvivante-mx6 libvivante-mx6-dev libvivante-mx6-dbg \
+"
 
 USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
 USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no", d)}"
@@ -69,12 +57,6 @@ do_install () {
     rm -r ${D}${includedir}/GL
     cp -axr ${S}/opt ${D}
 
-    # FIXME: Drop default library as we need to explicit link to one
-    #        of supported backends
-    rm ${D}${libdir}/libEGL.so \
-       ${D}${libdir}/libGAL.so \
-       ${D}${libdir}/libVIVANTE.so
-
     if [ "${USE_X11}" = "yes" ]; then
         find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
         find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
@@ -89,6 +71,24 @@ do_install () {
         fi
     fi
 
+    # We'll only have one backend here so we rename it to generic name
+    # and avoid rework in other packages, when possible
+    rm ${D}${libdir}/libEGL.so ${D}${libdir}/libGAL.so \
+       ${D}${libdir}/libVIVANTE.so
+
+    renamed=
+    for backend in x11 fb dfb; do
+        for f in $(find ${D}${libdir} -name "*-$backend.so"); do
+            if [ -n "$renamed" ] && [ "$renamed" != "$backend" ]; then
+                bberror "More than one GPU backend is installed ($backend and $renamed)."
+                exit 1
+            fi
+
+            renamed=$backend
+            mv $f $(echo $f | sed "s,-$backend\.so,.so,g")
+         done
+    done
+
     find ${D}${libdir} -type f -exec chmod 644 {} \;
     find ${D}${includedir} -type f -exec chmod 644 {} \;
 }
@@ -103,29 +103,13 @@ FILES_libclc-mx6 = "${libdir}/libCLC${SOLIBS}"
 FILES_libclc-mx6-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}"
 FILES_libclc-mx6-dbg = "${libdir}/.debug/libCLC${SOLIBS}"
 
-FILES_libegl-fb-mx6 = "${libdir}/libEGL-fb${SOLIBS}"
-FILES_libegl-fb-mx6-dev = "${libdir}/libEGL-fb${SOLIBSDEV}"
-FILES_libegl-fb-mx6-dbg = "${libdir}/.debug/libEGL-fb${SOLIBS}"
-
-FILES_libegl-x11-mx6 = "${libdir}/libEGL-x11${SOLIBS}"
-FILES_libegl-x11-mx6-dev = "${libdir}/libEGL-x11${SOLIBSDEV}"
-FILES_libegl-x11-mx6-dbg = "${libdir}/.debug/libEGL-x11${SOLIBS}"
-
-FILES_libegl-dfb-mx6 = "${libdir}/libEGL-dfb${SOLIBS}"
-FILES_libegl-dfb-mx6-dev = "${libdir}/libEGL-dfb${SOLIBSDEV}"
-FILES_libegl-dfb-mx6-dbg = "${libdir}/.debug/libEGL-dfb${SOLIBS}"
-
-FILES_libgal-fb-mx6 = "${libdir}/libGAL-fb${SOLIBS}"
-FILES_libgal-fb-mx6-dev = "${libdir}/libGAL-fb${SOLIBSDEV}"
-FILES_libgal-fb-mx6-dbg = "${libdir}/.debug/libGAL-fb${SOLIBS}"
+FILES_libegl-mx6 = "${libdir}/libEGL${SOLIBS}"
+FILES_libegl-mx6-dev = "${libdir}/libEGL${SOLIBSDEV}"
+FILES_libegl-mx6-dbg = "${libdir}/.debug/libEGL${SOLIBS}"
 
-FILES_libgal-x11-mx6 = "${libdir}/libGAL-x11${SOLIBS}"
-FILES_libgal-x11-mx6-dev = "${libdir}/libGAL-x11${SOLIBSDEV}"
-FILES_libgal-x11-mx6-dbg = "${libdir}/.debug/libGAL-x11${SOLIBS}"
-
-FILES_libgal-dfb-mx6 = "${libdir}/libGAL-dfb${SOLIBS}"
-FILES_libgal-dfb-mx6-dev = "${libdir}/libGAL-dfb${SOLIBSDEV}"
-FILES_libgal-dfb-mx6-dbg = "${libdir}/.debug/libGAL-dfb${SOLIBS}"
+FILES_libgal-mx6 = "${libdir}/libGAL${SOLIBS}"
+FILES_libgal-mx6-dev = "${libdir}/libGAL${SOLIBSDEV}"
+FILES_libgal-mx6-dbg = "${libdir}/.debug/libGAL${SOLIBS}"
 
 FILES_libgles-mx6 = "${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBS}"
 FILES_libgles-mx6-dev = "${includedir}/GLES ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBSDEV}"
@@ -152,17 +136,9 @@ FILES_libvdk-mx6 = "${libdir}/libVDK${SOLIBS}"
 FILES_libvdk-mx6-dev = "${includedir}/*vdk.h ${libdir}/libVDK${SOLIBSDEV}"
 FILES_libvdk-mx6-dbg = "${libdir}/.debug/libVDK${SOLIBS}"
 
-FILES_libvivante-fb-mx6 = "${libdir}/libVIVANTE-fb${SOLIBS}"
-FILES_libvivante-fb-mx6-dev = "${libdir}/libVIVANTE-fb${SOLIBSDEV}"
-FILES_libvivante-fb-mx6-dbg = "${libdir}/.debug/libVIVANTE-fb${SOLIBS}"
-
-FILES_libvivante-x11-mx6 = "${libdir}/libVIVANTE-x11${SOLIBS}"
-FILES_libvivante-x11-mx6-dev = "${libdir}/libVIVANTE-x11${SOLIBSDEV}"
-FILES_libvivante-x11-mx6-dbg = "${libdir}/.debug/libVIVANTE-x11${SOLIBS}"
-
-FILES_libvivante-dfb-mx6 = "${libdir}/libVIVANTE-dfb${SOLIBS}"
-FILES_libvivante-dfb-mx6-dev = "${libdir}/libVIVANTE-dfb${SOLIBSDEV}"
-FILES_libvivante-dfb-mx6-dbg = "${libdir}/.debug/libVIVANTE-dfb${SOLIBS}"
+FILES_libvivante-mx6 = "${libdir}/libVIVANTE${SOLIBS}"
+FILES_libvivante-mx6-dev = "${libdir}/libVIVANTE${SOLIBSDEV}"
+FILES_libvivante-mx6-dbg = "${libdir}/.debug/libVIVANTE${SOLIBS}"
 
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 COMPATIBLE_MACHINE = "(mx6)"
diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
index 28491c9..6cd8a5e 100644
--- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
+++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
@@ -5,7 +5,7 @@
 require recipes-graphics/xorg-driver/xorg-driver-video.inc
 
 PE = "3"
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
 
 DEPENDS += "virtual/libx11 virtual/libgal-x11 gpu-viv-bin-mx6q"
 
@@ -18,7 +18,6 @@ SRC_URI[sha256sum] = "d53216d5f9e3f7803983ac1577d83985dfda33145e4711300f4ad5cbbe
 
 EXTRA_OECONF_armv7a = " --enable-neon --disable-static"
 CFLAGS += " -I${STAGING_INCDIR}/xorg -I${STAGING_INCDIR}/drm"
-LDFLAGS += "-lm -ldl -lX11 -lGAL-x11"
 
 S = "${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/EXA/"
 
-- 
1.8.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [meta-fsl-arm][PATCH v2 2/5] xf86-video-imxfb-vivante: Add missing dependency of virtual/xserver
  2013-04-05  1:42 [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Otavio Salvador
@ 2013-04-05  1:42 ` Otavio Salvador
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 3/5] Revert "pointercal-xinput: Add pointercal.xinput to mxs" Otavio Salvador
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05  1:42 UTC (permalink / raw)
  To: meta-freescale Mailing List; +Cc: Otavio Salvador

The driver needs to use EXA headers during the build and those are
deployed by Xorg after its build so we need to depends on it.

Change-Id: I8956f27deddcbbcab22f7db1cf013d53970cdf7e
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
index 6cd8a5e..b63459e 100644
--- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
+++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
@@ -7,7 +7,7 @@ require recipes-graphics/xorg-driver/xorg-driver-video.inc
 PE = "3"
 PR = "${INC_PR}.3"
 
-DEPENDS += "virtual/libx11 virtual/libgal-x11 gpu-viv-bin-mx6q"
+DEPENDS += "virtual/xserver virtual/libx11 virtual/libgal-x11 gpu-viv-bin-mx6q"
 
 LIC_FILES_CHKSUM = "file://src/vivante_fbdev/vivante.h;endline=19;md5=93a322f91ec495569dcbcfbb2a95454a"
 
-- 
1.8.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [meta-fsl-arm][PATCH v2 3/5] Revert "pointercal-xinput: Add pointercal.xinput to mxs"
  2013-04-05  1:42 [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Otavio Salvador
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 2/5] xf86-video-imxfb-vivante: Add missing dependency of virtual/xserver Otavio Salvador
@ 2013-04-05  1:42 ` Otavio Salvador
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 4/5] gst-plugins-gl: Fix dependency definition Otavio Salvador
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05  1:42 UTC (permalink / raw)
  To: meta-freescale Mailing List; +Cc: Otavio Salvador

This reverts commit 55fd83d9ae0a7feef3901041209182306a3d6072.

OE-Core does not include pointercal-xinput yet and it is part of
Meta-OpenEmbedded so it cannot be part of BSP right now. We will have
this included in meta-fsl-demos as an intering solution until full
XInput support is included onto OE-Core.

Change-Id: Ia577892182aa75163c016772beaf861cffee78dd
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../xinput-calibrator/pointercal-xinput/mxs/pointercal.xinput           | 2 --
 recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bbappend       | 2 --
 2 files changed, 4 deletions(-)
 delete mode 100644 recipes-graphics/xinput-calibrator/pointercal-xinput/mxs/pointercal.xinput
 delete mode 100644 recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bbappend

diff --git a/recipes-graphics/xinput-calibrator/pointercal-xinput/mxs/pointercal.xinput b/recipes-graphics/xinput-calibrator/pointercal-xinput/mxs/pointercal.xinput
deleted file mode 100644
index 59f7630..0000000
--- a/recipes-graphics/xinput-calibrator/pointercal-xinput/mxs/pointercal.xinput
+++ /dev/null
@@ -1,2 +0,0 @@
-xinput set-int-prop "MXS touchscreen" "Evdev Axis Calibration" 32 194 3938 301 3878
-xinput set-int-prop "MXS touchscreen" "Evdev Axes Swap" 8 1
diff --git a/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bbappend b/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bbappend
deleted file mode 100644
index a9c60f3..0000000
--- a/recipes-graphics/xinput-calibrator/pointercal-xinput_0.0.bbappend
+++ /dev/null
@@ -1,2 +0,0 @@
-# Append path for freescale layer to include bsp pointercal.xinput
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-- 
1.8.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [meta-fsl-arm][PATCH v2 4/5] gst-plugins-gl: Fix dependency definition
  2013-04-05  1:42 [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Otavio Salvador
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 2/5] xf86-video-imxfb-vivante: Add missing dependency of virtual/xserver Otavio Salvador
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 3/5] Revert "pointercal-xinput: Add pointercal.xinput to mxs" Otavio Salvador
@ 2013-04-05  1:42 ` Otavio Salvador
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend Otavio Salvador
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05  1:42 UTC (permalink / raw)
  To: meta-freescale Mailing List; +Cc: Otavio Salvador

The 'DEPENDS_mx6 +=' behaviour is confusing and when we're using
overrides we in fact override the original value instead of appending
it. To get the expected behavior we need to use 'DEPENDS_append_mx6 ='.

Change-Id: Ibb23ef34876de83e2921c528e08c8df55447af05
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
index 786a3b5..65257d5 100644
--- a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
+++ b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
@@ -1,11 +1,9 @@
 # gst-plugins-gl for imx6 Vivante
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-PRINC := "${@int(PRINC) + 1}"
+PRINC := "${@int(PRINC) + 2}"
 
-DEPENDS_mx6 += "gst-fsl-plugin"
-DEPENDS_${PN}_mx6 += "gpu-viv-bin-mx6q"
-RDEPENDS_${PN}_mx6 += "libglslc-mx6"
+DEPENDS_append_mx6 = " gst-fsl-plugin gpu-viv-bin-mx6q"
 
 SRC_URI_append_mx6 = " \
    file://0001-freescale-mx6-release-1.1.0.patch \
-- 
1.8.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend
  2013-04-05  1:42 [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Otavio Salvador
                   ` (2 preceding siblings ...)
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 4/5] gst-plugins-gl: Fix dependency definition Otavio Salvador
@ 2013-04-05  1:42 ` Otavio Salvador
  2013-04-05  2:25   ` Philip Craig
  2013-04-05  6:44 ` [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Eric Bénard
  2013-04-12  9:13 ` Thomas Senyk
  5 siblings, 1 reply; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05  1:42 UTC (permalink / raw)
  To: meta-freescale Mailing List; +Cc: Otavio Salvador

The X11 backend were failing to build due deprecated calls of GLib
methods; this fixes it.

Change-Id: Iaf289bc174b45c69ef6d0c590e12daef78e65a49
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
 .../0002-remove-deprecated-glib-semaphores.patch   | 49 ++++++++++++++++++----
 .../gstreamer/gst-plugins-gl_0.10.3.bbappend       |  2 +-
 2 files changed, 43 insertions(+), 8 deletions(-)

diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
index d50290d..36a946b 100644
--- a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
+++ b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
@@ -1,7 +1,7 @@
-From 5b7e83390bbf87e67079c1dc8fcf12b321d7b0a0 Mon Sep 17 00:00:00 2001
+From f48afb8dc3b7a89de7c72b8076b3003c320cf0a9 Mon Sep 17 00:00:00 2001
 From: Jeremy Stashluk <jstashluk@dekaresearch.com>
 Date: Tue, 19 Feb 2013 09:46:29 -0500
-Subject: remove deprecated glib semaphores
+Subject: [PATCH] remove deprecated glib semaphores
 
 glib deprecated g_{mutex|cond}_new calls since version 3.32. Replace
 with the updated g_{mutex|cond}_init calls.
@@ -12,10 +12,11 @@ Upstream-Status: Pending
 
 Signed-off-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
 ---
- gst-libs/gst/gl/gstgldisplay.c      |   20 +++++++++++---------
- gst-libs/gst/gl/gstglmixer.c        |    5 +++--
- gst-libs/gst/gl/gstglwindow_fbES2.c |   15 +++++++++------
- 3 files changed, 23 insertions(+), 17 deletions(-)
+ gst-libs/gst/gl/gstgldisplay.c       | 20 +++++++++++---------
+ gst-libs/gst/gl/gstglmixer.c         |  5 +++--
+ gst-libs/gst/gl/gstglwindow_fbES2.c  | 15 +++++++++------
+ gst-libs/gst/gl/gstglwindow_x11ES2.c | 10 ++++++----
+ 4 files changed, 29 insertions(+), 21 deletions(-)
 
 diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
 index a2589cb..1beac40 100644
@@ -141,6 +142,40 @@ index 57c02e1..d73cada 100644
    priv->running = TRUE;
    priv->allow_extra_expose_events = TRUE;
  
+diff --git a/gst-libs/gst/gl/gstglwindow_x11ES2.c b/gst-libs/gst/gl/gstglwindow_x11ES2.c
+index 65afb50..814ce68 100644
+--- a/gst-libs/gst/gl/gstglwindow_x11ES2.c
++++ b/gst-libs/gst/gl/gstglwindow_x11ES2.c
+@@ -159,14 +159,14 @@ gst_gl_window_finalize (GObject * object)
+   g_debug ("display sender closed\n");
+ 
+   if (priv->cond_send_message) {
+-    g_cond_free (priv->cond_send_message);
++    g_cond_clear (priv->cond_send_message);
+     priv->cond_send_message = NULL;
+   }
+ 
+   g_mutex_unlock (priv->x_lock);
+ 
+   if (priv->x_lock) {
+-    g_mutex_free (priv->x_lock);
++    g_mutex_clear (priv->x_lock);
+     priv->x_lock = NULL;
+   }
+ 
+@@ -329,8 +329,10 @@ gst_gl_window_new (gulong external_gl_context)
+ 
+   setlocale (LC_NUMERIC, "C");
+ 
+-  priv->x_lock = g_mutex_new ();
+-  priv->cond_send_message = g_cond_new ();
++  priv->x_lock = g_new (GMutex, 1);
++  priv->cond_send_message = g_new (GCond, 1);
++  g_mutex_init (priv->x_lock);
++  g_cond_init (priv->cond_send_message);
+   priv->running = TRUE;
+   priv->visible = FALSE;
+   priv->parent = 0;
 -- 
-1.7.9.5
+1.8.1
 
diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
index 65257d5..20fa0a6 100644
--- a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
+++ b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
@@ -1,7 +1,7 @@
 # gst-plugins-gl for imx6 Vivante
 
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-PRINC := "${@int(PRINC) + 2}"
+PRINC := "${@int(PRINC) + 3}"
 
 DEPENDS_append_mx6 = " gst-fsl-plugin gpu-viv-bin-mx6q"
 
-- 
1.8.1



^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend Otavio Salvador
@ 2013-04-05  2:25   ` Philip Craig
  2013-04-05  3:07     ` Otavio Salvador
  0 siblings, 1 reply; 17+ messages in thread
From: Philip Craig @ 2013-04-05  2:25 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale Mailing List

On Fri, Apr 5, 2013 at 11:42 AM, Otavio Salvador
<otavio@ossystems.com.br> wrote:
> The X11 backend were failing to build due deprecated calls of GLib
> methods; this fixes it.
>
> Change-Id: Iaf289bc174b45c69ef6d0c590e12daef78e65a49
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  .../0002-remove-deprecated-glib-semaphores.patch   | 49 ++++++++++++++++++----
>  .../gstreamer/gst-plugins-gl_0.10.3.bbappend       |  2 +-
>  2 files changed, 43 insertions(+), 8 deletions(-)
>
> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
> index d50290d..36a946b 100644
> --- a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
> @@ -1,7 +1,7 @@
> -From 5b7e83390bbf87e67079c1dc8fcf12b321d7b0a0 Mon Sep 17 00:00:00 2001
> +From f48afb8dc3b7a89de7c72b8076b3003c320cf0a9 Mon Sep 17 00:00:00 2001
>  From: Jeremy Stashluk <jstashluk@dekaresearch.com>
>  Date: Tue, 19 Feb 2013 09:46:29 -0500
> -Subject: remove deprecated glib semaphores
> +Subject: [PATCH] remove deprecated glib semaphores
>
>  glib deprecated g_{mutex|cond}_new calls since version 3.32. Replace
>  with the updated g_{mutex|cond}_init calls.
> @@ -12,10 +12,11 @@ Upstream-Status: Pending
>
>  Signed-off-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
>  ---
> - gst-libs/gst/gl/gstgldisplay.c      |   20 +++++++++++---------
> - gst-libs/gst/gl/gstglmixer.c        |    5 +++--
> - gst-libs/gst/gl/gstglwindow_fbES2.c |   15 +++++++++------
> - 3 files changed, 23 insertions(+), 17 deletions(-)
> + gst-libs/gst/gl/gstgldisplay.c       | 20 +++++++++++---------
> + gst-libs/gst/gl/gstglmixer.c         |  5 +++--
> + gst-libs/gst/gl/gstglwindow_fbES2.c  | 15 +++++++++------
> + gst-libs/gst/gl/gstglwindow_x11ES2.c | 10 ++++++----
> + 4 files changed, 29 insertions(+), 21 deletions(-)
>
>  diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
>  index a2589cb..1beac40 100644
> @@ -141,6 +142,40 @@ index 57c02e1..d73cada 100644
>     priv->running = TRUE;
>     priv->allow_extra_expose_events = TRUE;
>
> +diff --git a/gst-libs/gst/gl/gstglwindow_x11ES2.c b/gst-libs/gst/gl/gstglwindow_x11ES2.c
> +index 65afb50..814ce68 100644
> +--- a/gst-libs/gst/gl/gstglwindow_x11ES2.c
> ++++ b/gst-libs/gst/gl/gstglwindow_x11ES2.c
> +@@ -159,14 +159,14 @@ gst_gl_window_finalize (GObject * object)
> +   g_debug ("display sender closed\n");
> +
> +   if (priv->cond_send_message) {
> +-    g_cond_free (priv->cond_send_message);
> ++    g_cond_clear (priv->cond_send_message);
> +     priv->cond_send_message = NULL;
> +   }
> +
> +   g_mutex_unlock (priv->x_lock);
> +
> +   if (priv->x_lock) {
> +-    g_mutex_free (priv->x_lock);
> ++    g_mutex_clear (priv->x_lock);
> +     priv->x_lock = NULL;
> +   }
> +
> +@@ -329,8 +329,10 @@ gst_gl_window_new (gulong external_gl_context)
> +
> +   setlocale (LC_NUMERIC, "C");
> +
> +-  priv->x_lock = g_mutex_new ();
> +-  priv->cond_send_message = g_cond_new ();
> ++  priv->x_lock = g_new (GMutex, 1);
> ++  priv->cond_send_message = g_new (GCond, 1);

There is no matching g_free() for the g_new(), so won't this leak
memory now? It probably should embed the locks in the structure,
rather than allocating them with g_new().

> ++  g_mutex_init (priv->x_lock);
> ++  g_cond_init (priv->cond_send_message);
> +   priv->running = TRUE;
> +   priv->visible = FALSE;
> +   priv->parent = 0;
>  --
> -1.7.9.5
> +1.8.1
>
> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
> index 65257d5..20fa0a6 100644
> --- a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
> @@ -1,7 +1,7 @@
>  # gst-plugins-gl for imx6 Vivante
>
>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
> -PRINC := "${@int(PRINC) + 2}"
> +PRINC := "${@int(PRINC) + 3}"
>
>  DEPENDS_append_mx6 = " gst-fsl-plugin gpu-viv-bin-mx6q"
>
> --
> 1.8.1
>
> _______________________________________________
> meta-freescale mailing list
> meta-freescale@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-freescale


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend
  2013-04-05  2:25   ` Philip Craig
@ 2013-04-05  3:07     ` Otavio Salvador
  2013-04-05  3:21       ` Philip Craig
  0 siblings, 1 reply; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05  3:07 UTC (permalink / raw)
  To: Philip Craig; +Cc: meta-freescale Mailing List

On Thu, Apr 4, 2013 at 11:25 PM, Philip Craig <phil@blackmoth.com.au> wrote:
> On Fri, Apr 5, 2013 at 11:42 AM, Otavio Salvador
> <otavio@ossystems.com.br> wrote:
>> The X11 backend were failing to build due deprecated calls of GLib
>> methods; this fixes it.
>>
>> Change-Id: Iaf289bc174b45c69ef6d0c590e12daef78e65a49
>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>> ---
>>  .../0002-remove-deprecated-glib-semaphores.patch   | 49 ++++++++++++++++++----
>>  .../gstreamer/gst-plugins-gl_0.10.3.bbappend       |  2 +-
>>  2 files changed, 43 insertions(+), 8 deletions(-)
>>
>> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>> index d50290d..36a946b 100644
>> --- a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>> @@ -1,7 +1,7 @@
>> -From 5b7e83390bbf87e67079c1dc8fcf12b321d7b0a0 Mon Sep 17 00:00:00 2001
>> +From f48afb8dc3b7a89de7c72b8076b3003c320cf0a9 Mon Sep 17 00:00:00 2001
>>  From: Jeremy Stashluk <jstashluk@dekaresearch.com>
>>  Date: Tue, 19 Feb 2013 09:46:29 -0500
>> -Subject: remove deprecated glib semaphores
>> +Subject: [PATCH] remove deprecated glib semaphores
>>
>>  glib deprecated g_{mutex|cond}_new calls since version 3.32. Replace
>>  with the updated g_{mutex|cond}_init calls.
>> @@ -12,10 +12,11 @@ Upstream-Status: Pending
>>
>>  Signed-off-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
>>  ---
>> - gst-libs/gst/gl/gstgldisplay.c      |   20 +++++++++++---------
>> - gst-libs/gst/gl/gstglmixer.c        |    5 +++--
>> - gst-libs/gst/gl/gstglwindow_fbES2.c |   15 +++++++++------
>> - 3 files changed, 23 insertions(+), 17 deletions(-)
>> + gst-libs/gst/gl/gstgldisplay.c       | 20 +++++++++++---------
>> + gst-libs/gst/gl/gstglmixer.c         |  5 +++--
>> + gst-libs/gst/gl/gstglwindow_fbES2.c  | 15 +++++++++------
>> + gst-libs/gst/gl/gstglwindow_x11ES2.c | 10 ++++++----
>> + 4 files changed, 29 insertions(+), 21 deletions(-)
>>
>>  diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
>>  index a2589cb..1beac40 100644
>> @@ -141,6 +142,40 @@ index 57c02e1..d73cada 100644
>>     priv->running = TRUE;
>>     priv->allow_extra_expose_events = TRUE;
>>
>> +diff --git a/gst-libs/gst/gl/gstglwindow_x11ES2.c b/gst-libs/gst/gl/gstglwindow_x11ES2.c
>> +index 65afb50..814ce68 100644
>> +--- a/gst-libs/gst/gl/gstglwindow_x11ES2.c
>> ++++ b/gst-libs/gst/gl/gstglwindow_x11ES2.c
>> +@@ -159,14 +159,14 @@ gst_gl_window_finalize (GObject * object)
>> +   g_debug ("display sender closed\n");
>> +
>> +   if (priv->cond_send_message) {
>> +-    g_cond_free (priv->cond_send_message);
>> ++    g_cond_clear (priv->cond_send_message);
>> +     priv->cond_send_message = NULL;
>> +   }
>> +
>> +   g_mutex_unlock (priv->x_lock);
>> +
>> +   if (priv->x_lock) {
>> +-    g_mutex_free (priv->x_lock);
>> ++    g_mutex_clear (priv->x_lock);
>> +     priv->x_lock = NULL;
>> +   }
>> +
>> +@@ -329,8 +329,10 @@ gst_gl_window_new (gulong external_gl_context)
>> +
>> +   setlocale (LC_NUMERIC, "C");
>> +
>> +-  priv->x_lock = g_mutex_new ();
>> +-  priv->cond_send_message = g_cond_new ();
>> ++  priv->x_lock = g_new (GMutex, 1);
>> ++  priv->cond_send_message = g_new (GCond, 1);
>
> There is no matching g_free() for the g_new(), so won't this leak
> memory now? It probably should embed the locks in the structure,
> rather than allocating them with g_new().

According to GLib doc it does free the resouces
(https://developer.gnome.org/glib/2.31/glib-Threads.html#g-mutex-clear)

>> ++  g_mutex_init (priv->x_lock);
>> ++  g_cond_init (priv->cond_send_message);
>> +   priv->running = TRUE;
>> +   priv->visible = FALSE;
>> +   priv->parent = 0;
>>  --
>> -1.7.9.5
>> +1.8.1
>>
>> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>> index 65257d5..20fa0a6 100644
>> --- a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>> @@ -1,7 +1,7 @@
>>  # gst-plugins-gl for imx6 Vivante
>>
>>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>> -PRINC := "${@int(PRINC) + 2}"
>> +PRINC := "${@int(PRINC) + 3}"
>>
>>  DEPENDS_append_mx6 = " gst-fsl-plugin gpu-viv-bin-mx6q"
>>
>> --
>> 1.8.1
>>
>> _______________________________________________
>> meta-freescale mailing list
>> meta-freescale@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/meta-freescale



--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend
  2013-04-05  3:07     ` Otavio Salvador
@ 2013-04-05  3:21       ` Philip Craig
  2013-04-05 11:20         ` Otavio Salvador
  0 siblings, 1 reply; 17+ messages in thread
From: Philip Craig @ 2013-04-05  3:21 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale Mailing List

On Fri, Apr 5, 2013 at 1:07 PM, Otavio Salvador <otavio@ossystems.com.br> wrote:
> On Thu, Apr 4, 2013 at 11:25 PM, Philip Craig <phil@blackmoth.com.au> wrote:
>> On Fri, Apr 5, 2013 at 11:42 AM, Otavio Salvador
>> <otavio@ossystems.com.br> wrote:
>>> The X11 backend were failing to build due deprecated calls of GLib
>>> methods; this fixes it.
>>>
>>> Change-Id: Iaf289bc174b45c69ef6d0c590e12daef78e65a49
>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>> ---
>>>  .../0002-remove-deprecated-glib-semaphores.patch   | 49 ++++++++++++++++++----
>>>  .../gstreamer/gst-plugins-gl_0.10.3.bbappend       |  2 +-
>>>  2 files changed, 43 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>> index d50290d..36a946b 100644
>>> --- a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>> @@ -1,7 +1,7 @@
>>> -From 5b7e83390bbf87e67079c1dc8fcf12b321d7b0a0 Mon Sep 17 00:00:00 2001
>>> +From f48afb8dc3b7a89de7c72b8076b3003c320cf0a9 Mon Sep 17 00:00:00 2001
>>>  From: Jeremy Stashluk <jstashluk@dekaresearch.com>
>>>  Date: Tue, 19 Feb 2013 09:46:29 -0500
>>> -Subject: remove deprecated glib semaphores
>>> +Subject: [PATCH] remove deprecated glib semaphores
>>>
>>>  glib deprecated g_{mutex|cond}_new calls since version 3.32. Replace
>>>  with the updated g_{mutex|cond}_init calls.
>>> @@ -12,10 +12,11 @@ Upstream-Status: Pending
>>>
>>>  Signed-off-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
>>>  ---
>>> - gst-libs/gst/gl/gstgldisplay.c      |   20 +++++++++++---------
>>> - gst-libs/gst/gl/gstglmixer.c        |    5 +++--
>>> - gst-libs/gst/gl/gstglwindow_fbES2.c |   15 +++++++++------
>>> - 3 files changed, 23 insertions(+), 17 deletions(-)
>>> + gst-libs/gst/gl/gstgldisplay.c       | 20 +++++++++++---------
>>> + gst-libs/gst/gl/gstglmixer.c         |  5 +++--
>>> + gst-libs/gst/gl/gstglwindow_fbES2.c  | 15 +++++++++------
>>> + gst-libs/gst/gl/gstglwindow_x11ES2.c | 10 ++++++----
>>> + 4 files changed, 29 insertions(+), 21 deletions(-)
>>>
>>>  diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
>>>  index a2589cb..1beac40 100644
>>> @@ -141,6 +142,40 @@ index 57c02e1..d73cada 100644
>>>     priv->running = TRUE;
>>>     priv->allow_extra_expose_events = TRUE;
>>>
>>> +diff --git a/gst-libs/gst/gl/gstglwindow_x11ES2.c b/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>> +index 65afb50..814ce68 100644
>>> +--- a/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>> ++++ b/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>> +@@ -159,14 +159,14 @@ gst_gl_window_finalize (GObject * object)
>>> +   g_debug ("display sender closed\n");
>>> +
>>> +   if (priv->cond_send_message) {
>>> +-    g_cond_free (priv->cond_send_message);
>>> ++    g_cond_clear (priv->cond_send_message);
>>> +     priv->cond_send_message = NULL;
>>> +   }
>>> +
>>> +   g_mutex_unlock (priv->x_lock);
>>> +
>>> +   if (priv->x_lock) {
>>> +-    g_mutex_free (priv->x_lock);
>>> ++    g_mutex_clear (priv->x_lock);
>>> +     priv->x_lock = NULL;
>>> +   }
>>> +
>>> +@@ -329,8 +329,10 @@ gst_gl_window_new (gulong external_gl_context)
>>> +
>>> +   setlocale (LC_NUMERIC, "C");
>>> +
>>> +-  priv->x_lock = g_mutex_new ();
>>> +-  priv->cond_send_message = g_cond_new ();
>>> ++  priv->x_lock = g_new (GMutex, 1);
>>> ++  priv->cond_send_message = g_new (GCond, 1);
>>
>> There is no matching g_free() for the g_new(), so won't this leak
>> memory now? It probably should embed the locks in the structure,
>> rather than allocating them with g_new().
>
> According to GLib doc it does free the resouces
> (https://developer.gnome.org/glib/2.31/glib-Threads.html#g-mutex-clear)

My understanding is that g_mutex_clear() frees the resources allocated
by g_mutex_init(), but doesn't free the memory allocated by g_new().

The GLib doc talking about the deprecation suggests to statically
allocate or embed, not to switch to using g_new()
https://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html#g-mutex-free

>
>>> ++  g_mutex_init (priv->x_lock);
>>> ++  g_cond_init (priv->cond_send_message);
>>> +   priv->running = TRUE;
>>> +   priv->visible = FALSE;
>>> +   priv->parent = 0;
>>>  --
>>> -1.7.9.5
>>> +1.8.1
>>>
>>> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>> index 65257d5..20fa0a6 100644
>>> --- a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>> @@ -1,7 +1,7 @@
>>>  # gst-plugins-gl for imx6 Vivante
>>>
>>>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>>> -PRINC := "${@int(PRINC) + 2}"
>>> +PRINC := "${@int(PRINC) + 3}"
>>>
>>>  DEPENDS_append_mx6 = " gst-fsl-plugin gpu-viv-bin-mx6q"
>>>
>>> --
>>> 1.8.1
>>>
>>> _______________________________________________
>>> meta-freescale mailing list
>>> meta-freescale@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/meta-freescale
>
>
>
> --
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use
  2013-04-05  1:42 [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Otavio Salvador
                   ` (3 preceding siblings ...)
  2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend Otavio Salvador
@ 2013-04-05  6:44 ` Eric Bénard
  2013-04-05 11:23   ` Otavio Salvador
  2013-04-12  9:13 ` Thomas Senyk
  5 siblings, 1 reply; 17+ messages in thread
From: Eric Bénard @ 2013-04-05  6:44 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale Mailing List

Hi Otavio,

what are the changes in this patchset sincce v1 ?

Eric


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend
  2013-04-05  3:21       ` Philip Craig
@ 2013-04-05 11:20         ` Otavio Salvador
  2013-04-05 12:03           ` Philip Craig
  0 siblings, 1 reply; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05 11:20 UTC (permalink / raw)
  To: Philip Craig; +Cc: meta-freescale Mailing List

On Fri, Apr 5, 2013 at 12:21 AM, Philip Craig <phil@blackmoth.com.au> wrote:
> On Fri, Apr 5, 2013 at 1:07 PM, Otavio Salvador <otavio@ossystems.com.br> wrote:
>> On Thu, Apr 4, 2013 at 11:25 PM, Philip Craig <phil@blackmoth.com.au> wrote:
>>> On Fri, Apr 5, 2013 at 11:42 AM, Otavio Salvador
>>> <otavio@ossystems.com.br> wrote:
>>>> The X11 backend were failing to build due deprecated calls of GLib
>>>> methods; this fixes it.
>>>>
>>>> Change-Id: Iaf289bc174b45c69ef6d0c590e12daef78e65a49
>>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>>> ---
>>>>  .../0002-remove-deprecated-glib-semaphores.patch   | 49 ++++++++++++++++++----
>>>>  .../gstreamer/gst-plugins-gl_0.10.3.bbappend       |  2 +-
>>>>  2 files changed, 43 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>>> index d50290d..36a946b 100644
>>>> --- a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>>> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>>> @@ -1,7 +1,7 @@
>>>> -From 5b7e83390bbf87e67079c1dc8fcf12b321d7b0a0 Mon Sep 17 00:00:00 2001
>>>> +From f48afb8dc3b7a89de7c72b8076b3003c320cf0a9 Mon Sep 17 00:00:00 2001
>>>>  From: Jeremy Stashluk <jstashluk@dekaresearch.com>
>>>>  Date: Tue, 19 Feb 2013 09:46:29 -0500
>>>> -Subject: remove deprecated glib semaphores
>>>> +Subject: [PATCH] remove deprecated glib semaphores
>>>>
>>>>  glib deprecated g_{mutex|cond}_new calls since version 3.32. Replace
>>>>  with the updated g_{mutex|cond}_init calls.
>>>> @@ -12,10 +12,11 @@ Upstream-Status: Pending
>>>>
>>>>  Signed-off-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
>>>>  ---
>>>> - gst-libs/gst/gl/gstgldisplay.c      |   20 +++++++++++---------
>>>> - gst-libs/gst/gl/gstglmixer.c        |    5 +++--
>>>> - gst-libs/gst/gl/gstglwindow_fbES2.c |   15 +++++++++------
>>>> - 3 files changed, 23 insertions(+), 17 deletions(-)
>>>> + gst-libs/gst/gl/gstgldisplay.c       | 20 +++++++++++---------
>>>> + gst-libs/gst/gl/gstglmixer.c         |  5 +++--
>>>> + gst-libs/gst/gl/gstglwindow_fbES2.c  | 15 +++++++++------
>>>> + gst-libs/gst/gl/gstglwindow_x11ES2.c | 10 ++++++----
>>>> + 4 files changed, 29 insertions(+), 21 deletions(-)
>>>>
>>>>  diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
>>>>  index a2589cb..1beac40 100644
>>>> @@ -141,6 +142,40 @@ index 57c02e1..d73cada 100644
>>>>     priv->running = TRUE;
>>>>     priv->allow_extra_expose_events = TRUE;
>>>>
>>>> +diff --git a/gst-libs/gst/gl/gstglwindow_x11ES2.c b/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>>> +index 65afb50..814ce68 100644
>>>> +--- a/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>>> ++++ b/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>>> +@@ -159,14 +159,14 @@ gst_gl_window_finalize (GObject * object)
>>>> +   g_debug ("display sender closed\n");
>>>> +
>>>> +   if (priv->cond_send_message) {
>>>> +-    g_cond_free (priv->cond_send_message);
>>>> ++    g_cond_clear (priv->cond_send_message);
>>>> +     priv->cond_send_message = NULL;
>>>> +   }
>>>> +
>>>> +   g_mutex_unlock (priv->x_lock);
>>>> +
>>>> +   if (priv->x_lock) {
>>>> +-    g_mutex_free (priv->x_lock);
>>>> ++    g_mutex_clear (priv->x_lock);
>>>> +     priv->x_lock = NULL;
>>>> +   }
>>>> +
>>>> +@@ -329,8 +329,10 @@ gst_gl_window_new (gulong external_gl_context)
>>>> +
>>>> +   setlocale (LC_NUMERIC, "C");
>>>> +
>>>> +-  priv->x_lock = g_mutex_new ();
>>>> +-  priv->cond_send_message = g_cond_new ();
>>>> ++  priv->x_lock = g_new (GMutex, 1);
>>>> ++  priv->cond_send_message = g_new (GCond, 1);
>>>
>>> There is no matching g_free() for the g_new(), so won't this leak
>>> memory now? It probably should embed the locks in the structure,
>>> rather than allocating them with g_new().
>>
>> According to GLib doc it does free the resouces
>> (https://developer.gnome.org/glib/2.31/glib-Threads.html#g-mutex-clear)
>
> My understanding is that g_mutex_clear() frees the resources allocated
> by g_mutex_init(), but doesn't free the memory allocated by g_new().
>
> The GLib doc talking about the deprecation suggests to statically
> allocate or embed, not to switch to using g_new()
> https://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html#g-mutex-free

It clear states an OR (statically allocated or initialized with
g_mutex_init). Checking g_mutex_init it says to use clear when not
need anymore: https://developer.gnome.org/glib/2.31/glib-Threads.html#g-mutex-init

I think it uses a reference counting to dealloc the memory. I am not
saying this is the better alternative but the eaiser with small code
change. I don't want to diverge too much from FSL code so the
maintenance work will  be harder.

>>
>>>> ++  g_mutex_init (priv->x_lock);
>>>> ++  g_cond_init (priv->cond_send_message);
>>>> +   priv->running = TRUE;
>>>> +   priv->visible = FALSE;
>>>> +   priv->parent = 0;
>>>>  --
>>>> -1.7.9.5
>>>> +1.8.1
>>>>
>>>> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>>> index 65257d5..20fa0a6 100644
>>>> --- a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>>> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>>> @@ -1,7 +1,7 @@
>>>>  # gst-plugins-gl for imx6 Vivante
>>>>
>>>>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>>>> -PRINC := "${@int(PRINC) + 2}"
>>>> +PRINC := "${@int(PRINC) + 3}"
>>>>
>>>>  DEPENDS_append_mx6 = " gst-fsl-plugin gpu-viv-bin-mx6q"
>>>>
>>>> --
>>>> 1.8.1
>>>>
>>>> _______________________________________________
>>>> meta-freescale mailing list
>>>> meta-freescale@yoctoproject.org
>>>> https://lists.yoctoproject.org/listinfo/meta-freescale
>>
>>
>>
>> --
>> Otavio Salvador                             O.S. Systems
>> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
>> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use
  2013-04-05  6:44 ` [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Eric Bénard
@ 2013-04-05 11:23   ` Otavio Salvador
  0 siblings, 0 replies; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05 11:23 UTC (permalink / raw)
  To: Eric Bénard; +Cc: meta-freescale Mailing List

On Fri, Apr 5, 2013 at 3:44 AM, Eric Bénard <eric@eukrea.com> wrote:
> Hi Otavio,
>
> what are the changes in this patchset sincce v1 ?

I've merged the xf86-video-imxfb-vivante change as per Fabio's request
to have it bisectable.

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend
  2013-04-05 11:20         ` Otavio Salvador
@ 2013-04-05 12:03           ` Philip Craig
  2013-04-05 13:41             ` Otavio Salvador
  0 siblings, 1 reply; 17+ messages in thread
From: Philip Craig @ 2013-04-05 12:03 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale Mailing List

On Fri, Apr 5, 2013 at 9:20 PM, Otavio Salvador <otavio@ossystems.com.br> wrote:
> On Fri, Apr 5, 2013 at 12:21 AM, Philip Craig <phil@blackmoth.com.au> wrote:
>> On Fri, Apr 5, 2013 at 1:07 PM, Otavio Salvador <otavio@ossystems.com.br> wrote:
>>> On Thu, Apr 4, 2013 at 11:25 PM, Philip Craig <phil@blackmoth.com.au> wrote:
>>>> On Fri, Apr 5, 2013 at 11:42 AM, Otavio Salvador
>>>> <otavio@ossystems.com.br> wrote:
>>>>> The X11 backend were failing to build due deprecated calls of GLib
>>>>> methods; this fixes it.
>>>>>
>>>>> Change-Id: Iaf289bc174b45c69ef6d0c590e12daef78e65a49
>>>>> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
>>>>> ---
>>>>>  .../0002-remove-deprecated-glib-semaphores.patch   | 49 ++++++++++++++++++----
>>>>>  .../gstreamer/gst-plugins-gl_0.10.3.bbappend       |  2 +-
>>>>>  2 files changed, 43 insertions(+), 8 deletions(-)
>>>>>
>>>>> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>>>> index d50290d..36a946b 100644
>>>>> --- a/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>>>> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl/0002-remove-deprecated-glib-semaphores.patch
>>>>> @@ -1,7 +1,7 @@
>>>>> -From 5b7e83390bbf87e67079c1dc8fcf12b321d7b0a0 Mon Sep 17 00:00:00 2001
>>>>> +From f48afb8dc3b7a89de7c72b8076b3003c320cf0a9 Mon Sep 17 00:00:00 2001
>>>>>  From: Jeremy Stashluk <jstashluk@dekaresearch.com>
>>>>>  Date: Tue, 19 Feb 2013 09:46:29 -0500
>>>>> -Subject: remove deprecated glib semaphores
>>>>> +Subject: [PATCH] remove deprecated glib semaphores
>>>>>
>>>>>  glib deprecated g_{mutex|cond}_new calls since version 3.32. Replace
>>>>>  with the updated g_{mutex|cond}_init calls.
>>>>> @@ -12,10 +12,11 @@ Upstream-Status: Pending
>>>>>
>>>>>  Signed-off-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
>>>>>  ---
>>>>> - gst-libs/gst/gl/gstgldisplay.c      |   20 +++++++++++---------
>>>>> - gst-libs/gst/gl/gstglmixer.c        |    5 +++--
>>>>> - gst-libs/gst/gl/gstglwindow_fbES2.c |   15 +++++++++------
>>>>> - 3 files changed, 23 insertions(+), 17 deletions(-)
>>>>> + gst-libs/gst/gl/gstgldisplay.c       | 20 +++++++++++---------
>>>>> + gst-libs/gst/gl/gstglmixer.c         |  5 +++--
>>>>> + gst-libs/gst/gl/gstglwindow_fbES2.c  | 15 +++++++++------
>>>>> + gst-libs/gst/gl/gstglwindow_x11ES2.c | 10 ++++++----
>>>>> + 4 files changed, 29 insertions(+), 21 deletions(-)
>>>>>
>>>>>  diff --git a/gst-libs/gst/gl/gstgldisplay.c b/gst-libs/gst/gl/gstgldisplay.c
>>>>>  index a2589cb..1beac40 100644
>>>>> @@ -141,6 +142,40 @@ index 57c02e1..d73cada 100644
>>>>>     priv->running = TRUE;
>>>>>     priv->allow_extra_expose_events = TRUE;
>>>>>
>>>>> +diff --git a/gst-libs/gst/gl/gstglwindow_x11ES2.c b/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>>>> +index 65afb50..814ce68 100644
>>>>> +--- a/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>>>> ++++ b/gst-libs/gst/gl/gstglwindow_x11ES2.c
>>>>> +@@ -159,14 +159,14 @@ gst_gl_window_finalize (GObject * object)
>>>>> +   g_debug ("display sender closed\n");
>>>>> +
>>>>> +   if (priv->cond_send_message) {
>>>>> +-    g_cond_free (priv->cond_send_message);
>>>>> ++    g_cond_clear (priv->cond_send_message);
>>>>> +     priv->cond_send_message = NULL;
>>>>> +   }
>>>>> +
>>>>> +   g_mutex_unlock (priv->x_lock);
>>>>> +
>>>>> +   if (priv->x_lock) {
>>>>> +-    g_mutex_free (priv->x_lock);
>>>>> ++    g_mutex_clear (priv->x_lock);
>>>>> +     priv->x_lock = NULL;
>>>>> +   }
>>>>> +
>>>>> +@@ -329,8 +329,10 @@ gst_gl_window_new (gulong external_gl_context)
>>>>> +
>>>>> +   setlocale (LC_NUMERIC, "C");
>>>>> +
>>>>> +-  priv->x_lock = g_mutex_new ();
>>>>> +-  priv->cond_send_message = g_cond_new ();
>>>>> ++  priv->x_lock = g_new (GMutex, 1);
>>>>> ++  priv->cond_send_message = g_new (GCond, 1);
>>>>
>>>> There is no matching g_free() for the g_new(), so won't this leak
>>>> memory now? It probably should embed the locks in the structure,
>>>> rather than allocating them with g_new().
>>>
>>> According to GLib doc it does free the resouces
>>> (https://developer.gnome.org/glib/2.31/glib-Threads.html#g-mutex-clear)
>>
>> My understanding is that g_mutex_clear() frees the resources allocated
>> by g_mutex_init(), but doesn't free the memory allocated by g_new().
>>
>> The GLib doc talking about the deprecation suggests to statically
>> allocate or embed, not to switch to using g_new()
>> https://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html#g-mutex-free
>
> It clear states an OR (statically allocated or initialized with
> g_mutex_init). Checking g_mutex_init it says to use clear when not
> need anymore: https://developer.gnome.org/glib/2.31/glib-Threads.html#g-mutex-init

The init/clear pair is fine. But the new is missing a matching free.

If you look at the source for g_mutex_clear, you can see if doesn't
free the mutex, only the p field.
https://git.gnome.org/browse/glib/tree/glib/gthread-posix.c#n189

> I think it uses a reference counting to dealloc the memory. I am not
> saying this is the better alternative but the eaiser with small code
> change. I don't want to diverge too much from FSL code so the
> maintenance work will  be harder.

If you want a minimal change then you could add a
-DGLIB_DISABLE_DEPRECATION_WARNINGS flag instead.

>>>
>>>>> ++  g_mutex_init (priv->x_lock);
>>>>> ++  g_cond_init (priv->cond_send_message);
>>>>> +   priv->running = TRUE;
>>>>> +   priv->visible = FALSE;
>>>>> +   priv->parent = 0;
>>>>>  --
>>>>> -1.7.9.5
>>>>> +1.8.1
>>>>>
>>>>> diff --git a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>>>> index 65257d5..20fa0a6 100644
>>>>> --- a/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>>>> +++ b/recipes-multimedia/gstreamer/gst-plugins-gl_0.10.3.bbappend
>>>>> @@ -1,7 +1,7 @@
>>>>>  # gst-plugins-gl for imx6 Vivante
>>>>>
>>>>>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>>>>> -PRINC := "${@int(PRINC) + 2}"
>>>>> +PRINC := "${@int(PRINC) + 3}"
>>>>>
>>>>>  DEPENDS_append_mx6 = " gst-fsl-plugin gpu-viv-bin-mx6q"
>>>>>
>>>>> --
>>>>> 1.8.1
>>>>>
>>>>> _______________________________________________
>>>>> meta-freescale mailing list
>>>>> meta-freescale@yoctoproject.org
>>>>> https://lists.yoctoproject.org/listinfo/meta-freescale
>>>
>>>
>>>
>>> --
>>> Otavio Salvador                             O.S. Systems
>>> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
>>> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
>
>
>
> --
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend
  2013-04-05 12:03           ` Philip Craig
@ 2013-04-05 13:41             ` Otavio Salvador
  0 siblings, 0 replies; 17+ messages in thread
From: Otavio Salvador @ 2013-04-05 13:41 UTC (permalink / raw)
  To: Philip Craig; +Cc: meta-freescale Mailing List

On Fri, Apr 5, 2013 at 9:03 AM, Philip Craig <phil@blackmoth.com.au> wrote:
> On Fri, Apr 5, 2013 at 9:20 PM, Otavio Salvador <otavio@ossystems.com.br> wrote:
>> On Fri, Apr 5, 2013 at 12:21 AM, Philip Craig <phil@blackmoth.com.au> wrote:
>>> On Fri, Apr 5, 2013 at 1:07 PM, Otavio Salvador <otavio@ossystems.com.br> wrote:
>>>> On Thu, Apr 4, 2013 at 11:25 PM, Philip Craig <phil@blackmoth.com.au> wrote:
>>>> According to GLib doc it does free the resouces
>>>> (https://developer.gnome.org/glib/2.31/glib-Threads.html#g-mutex-clear)
>>>
>>> My understanding is that g_mutex_clear() frees the resources allocated
>>> by g_mutex_init(), but doesn't free the memory allocated by g_new().
>>>
>>> The GLib doc talking about the deprecation suggests to statically
>>> allocate or embed, not to switch to using g_new()
>>> https://developer.gnome.org/glib/2.31/glib-Deprecated-Thread-APIs.html#g-mutex-free
>>
>> It clear states an OR (statically allocated or initialized with
>> g_mutex_init). Checking g_mutex_init it says to use clear when not
>> need anymore: https://developer.gnome.org/glib/2.31/glib-Threads.html#g-mutex-init
>
> The init/clear pair is fine. But the new is missing a matching free.
>
> If you look at the source for g_mutex_clear, you can see if doesn't
> free the mutex, only the p field.
> https://git.gnome.org/browse/glib/tree/glib/gthread-posix.c#n189
>
>> I think it uses a reference counting to dealloc the memory. I am not
>> saying this is the better alternative but the eaiser with small code
>> change. I don't want to diverge too much from FSL code so the
>> maintenance work will  be harder.
>
> If you want a minimal change then you could add a
> -DGLIB_DISABLE_DEPRECATION_WARNINGS flag instead.

Now I got you. Checking it, the rework done for the framebuffer code
is leaking memory as well. I will use the compiler flag and avoid
changing this code for now.

Thanks by spotting it :-)

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use
  2013-04-05  1:42 [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Otavio Salvador
                   ` (4 preceding siblings ...)
  2013-04-05  6:44 ` [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Eric Bénard
@ 2013-04-12  9:13 ` Thomas Senyk
  2013-04-12 11:44   ` Otavio Salvador
  5 siblings, 1 reply; 17+ messages in thread
From: Thomas Senyk @ 2013-04-12  9:13 UTC (permalink / raw)
  To: meta-freescale; +Cc: Otavio Salvador

On Thu, April 04, 2013 10:42:16 PM Otavio Salvador wrote:
> As we now provide a single backend there're no need for full set of
> packages and the binaries can use the generic names so we don't need
> to rework other applications and/or libraries to link properly.
> 
> The xf86-video-imxfb-vivante needs also to be change as the libraries
> are now under generic name so we remove the backend suffix from
> libraries so the LDFLAGS ought to be removed for the build to succeed.
> 
> Change-Id: I73cc9986babe8bb4fb0c05117c6b3d93b0470949
> Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
> ---
>  .../gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc          | 86
> ++++++++-------------- .../xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb  |
>  3 +-
>  2 files changed, 32 insertions(+), 57 deletions(-)
> 
> diff --git a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
> b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc index
> e8e491e..44f6fc9 100644
> --- a/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
> +++ b/recipes-graphics/gpu-viv-bin-mx6q/gpu-viv-bin-mx6q.inc
> @@ -17,16 +17,6 @@ SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true \
>             file://fix-conflicting-TLS-definition.patch \
>            "
> 
> -GPU_XLIBS = "libegl-x11-mx6 libegl-x11-mx6-dev libegl-x11-mx6-dbg \
> -	libgal-x11-mx6 libgal-x11-mx6-dev libgal-x11-mx6-dbg \
> -	libvivante-x11-mx6 libvivante-x11-mx6-dev libvivante-x11-mx6-dbg \
> -	"
> -
> -GPU_DFBLIBS = "libegl-dfb-mx6 libegl-dfb-mx6-dev libegl-dfb-mx6-dbg \
> -	libgal-dfb-mx6 libgal-dfb-mx6-dev libgal-dfb-mx6-dbg \
> -	libvivante-dfb-mx6 libvivante-dfb-mx6-dev libvivante-dfb-mx6-dbg \
> -	"
> -
>  PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
>  	libgles-mx6 libgles-mx6-dev libgles-mx6-dbg \
>  	libgles2-mx6 libgles2-mx6-dev libgles2-mx6-dbg \
> @@ -34,12 +24,10 @@ PACKAGES =+ "libclc-mx6 libclc-mx6-dev libclc-mx6-dbg \
>  	libopencl-mx6 libopencl-mx6-dev libopencl-mx6-dbg \
>  	libopenvg-mx6 libopenvg-mx6-dev libopenvg-mx6-dbg \
>  	libvdk-mx6 libvdk-mx6-dev libvdk-mx6-dbg \
> -	libegl-fb-mx6 libegl-fb-mx6-dev libegl-fb-mx6-dbg \
> -	libgal-fb-mx6 libgal-fb-mx6-dev libgal-fb-mx6-dbg \
> -	libvivante-fb-mx6 libvivante-fb-mx6-dev libvivante-fb-mx6-dbg \
> -	${@base_contains("DISTRO_FEATURES", "x11", "${GPU_XLIBS}", "", d)} \
> -	${@base_contains("DISTRO_FEATURES", "directfb", "${GPU_DFBLIBS}", "", d)}
> \ -	"
> +	libegl-mx6 libegl-mx6-dev libegl-mx6-dbg \
> +	libgal-mx6 libgal-mx6-dev libgal-mx6-dbg \
> +	libvivante-mx6 libvivante-mx6-dev libvivante-mx6-dbg \
> +"
> 
>  USE_X11 = "${@base_contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
>  USE_DFB = "${@base_contains("DISTRO_FEATURES", "directfb", "yes", "no",
> d)}" @@ -69,12 +57,6 @@ do_install () {
>      rm -r ${D}${includedir}/GL
>      cp -axr ${S}/opt ${D}
> 
> -    # FIXME: Drop default library as we need to explicit link to one
> -    #        of supported backends
> -    rm ${D}${libdir}/libEGL.so \
> -       ${D}${libdir}/libGAL.so \
> -       ${D}${libdir}/libVIVANTE.so
> -
>      if [ "${USE_X11}" = "yes" ]; then
>          find ${D}${libdir} -name '*-dfb.so' -exec rm '{}' ';'
>          find ${D}${libdir} -name '*-fb.so' -exec rm '{}' ';'
> @@ -89,6 +71,24 @@ do_install () {
>          fi
>      fi
> 
> +    # We'll only have one backend here so we rename it to generic name
> +    # and avoid rework in other packages, when possible
> +    rm ${D}${libdir}/libEGL.so ${D}${libdir}/libGAL.so \
> +       ${D}${libdir}/libVIVANTE.so
> +
> +    renamed=
> +    for backend in x11 fb dfb; do
> +        for f in $(find ${D}${libdir} -name "*-$backend.so"); do
> +            if [ -n "$renamed" ] && [ "$renamed" != "$backend" ]; then
> +                bberror "More than one GPU backend is installed ($backend
> and $renamed)." +                exit 1
> +            fi
> +
> +            renamed=$backend
> +            mv $f $(echo $f | sed "s,-$backend\.so,.so,g")

I'd personally rather vote for a symlink then a mv.
It's nearly the same cost, but it let's people identify which implementation 
is installed (besides other things)

> +         done
> +    done
> +
>      find ${D}${libdir} -type f -exec chmod 644 {} \;
>      find ${D}${includedir} -type f -exec chmod 644 {} \;
>  }
> @@ -103,29 +103,13 @@ FILES_libclc-mx6 = "${libdir}/libCLC${SOLIBS}"
>  FILES_libclc-mx6-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}"
>  FILES_libclc-mx6-dbg = "${libdir}/.debug/libCLC${SOLIBS}"
> 
> -FILES_libegl-fb-mx6 = "${libdir}/libEGL-fb${SOLIBS}"
> -FILES_libegl-fb-mx6-dev = "${libdir}/libEGL-fb${SOLIBSDEV}"
> -FILES_libegl-fb-mx6-dbg = "${libdir}/.debug/libEGL-fb${SOLIBS}"
> -
> -FILES_libegl-x11-mx6 = "${libdir}/libEGL-x11${SOLIBS}"
> -FILES_libegl-x11-mx6-dev = "${libdir}/libEGL-x11${SOLIBSDEV}"
> -FILES_libegl-x11-mx6-dbg = "${libdir}/.debug/libEGL-x11${SOLIBS}"
> -
> -FILES_libegl-dfb-mx6 = "${libdir}/libEGL-dfb${SOLIBS}"
> -FILES_libegl-dfb-mx6-dev = "${libdir}/libEGL-dfb${SOLIBSDEV}"
> -FILES_libegl-dfb-mx6-dbg = "${libdir}/.debug/libEGL-dfb${SOLIBS}"
> -
> -FILES_libgal-fb-mx6 = "${libdir}/libGAL-fb${SOLIBS}"
> -FILES_libgal-fb-mx6-dev = "${libdir}/libGAL-fb${SOLIBSDEV}"
> -FILES_libgal-fb-mx6-dbg = "${libdir}/.debug/libGAL-fb${SOLIBS}"
> +FILES_libegl-mx6 = "${libdir}/libEGL${SOLIBS}"
> +FILES_libegl-mx6-dev = "${libdir}/libEGL${SOLIBSDEV}"
> +FILES_libegl-mx6-dbg = "${libdir}/.debug/libEGL${SOLIBS}"
> 
> -FILES_libgal-x11-mx6 = "${libdir}/libGAL-x11${SOLIBS}"
> -FILES_libgal-x11-mx6-dev = "${libdir}/libGAL-x11${SOLIBSDEV}"
> -FILES_libgal-x11-mx6-dbg = "${libdir}/.debug/libGAL-x11${SOLIBS}"
> -
> -FILES_libgal-dfb-mx6 = "${libdir}/libGAL-dfb${SOLIBS}"
> -FILES_libgal-dfb-mx6-dev = "${libdir}/libGAL-dfb${SOLIBSDEV}"
> -FILES_libgal-dfb-mx6-dbg = "${libdir}/.debug/libGAL-dfb${SOLIBS}"
> +FILES_libgal-mx6 = "${libdir}/libGAL${SOLIBS}"
> +FILES_libgal-mx6-dev = "${libdir}/libGAL${SOLIBSDEV}"
> +FILES_libgal-mx6-dbg = "${libdir}/.debug/libGAL${SOLIBS}"
> 
>  FILES_libgles-mx6 = "${libdir}/libGLESv1*${SOLIBS}
> ${libdir}/libGLES_*${SOLIBS}" FILES_libgles-mx6-dev = "${includedir}/GLES
> ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBSDEV}" @@ -152,17
> +136,9 @@ FILES_libvdk-mx6 = "${libdir}/libVDK${SOLIBS}"
> FILES_libvdk-mx6-dev = "${includedir}/*vdk.h ${libdir}/libVDK${SOLIBSDEV}"
> FILES_libvdk-mx6-dbg = "${libdir}/.debug/libVDK${SOLIBS}"
> 
> -FILES_libvivante-fb-mx6 = "${libdir}/libVIVANTE-fb${SOLIBS}"
> -FILES_libvivante-fb-mx6-dev = "${libdir}/libVIVANTE-fb${SOLIBSDEV}"
> -FILES_libvivante-fb-mx6-dbg = "${libdir}/.debug/libVIVANTE-fb${SOLIBS}"
> -
> -FILES_libvivante-x11-mx6 = "${libdir}/libVIVANTE-x11${SOLIBS}"
> -FILES_libvivante-x11-mx6-dev = "${libdir}/libVIVANTE-x11${SOLIBSDEV}"
> -FILES_libvivante-x11-mx6-dbg = "${libdir}/.debug/libVIVANTE-x11${SOLIBS}"
> -
> -FILES_libvivante-dfb-mx6 = "${libdir}/libVIVANTE-dfb${SOLIBS}"
> -FILES_libvivante-dfb-mx6-dev = "${libdir}/libVIVANTE-dfb${SOLIBSDEV}"
> -FILES_libvivante-dfb-mx6-dbg = "${libdir}/.debug/libVIVANTE-dfb${SOLIBS}"
> +FILES_libvivante-mx6 = "${libdir}/libVIVANTE${SOLIBS}"
> +FILES_libvivante-mx6-dev = "${libdir}/libVIVANTE${SOLIBSDEV}"
> +FILES_libvivante-mx6-dbg = "${libdir}/.debug/libVIVANTE${SOLIBS}"
> 
>  PACKAGE_ARCH = "${MACHINE_ARCH}"
>  COMPATIBLE_MACHINE = "(mx6)"
> diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
> b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb index
> 28491c9..6cd8a5e 100644
> --- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
> +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_1.1.0.bb
> @@ -5,7 +5,7 @@
>  require recipes-graphics/xorg-driver/xorg-driver-video.inc
> 
>  PE = "3"
> -PR = "${INC_PR}.2"
> +PR = "${INC_PR}.3"
> 
>  DEPENDS += "virtual/libx11 virtual/libgal-x11 gpu-viv-bin-mx6q"
> 
> @@ -18,7 +18,6 @@ SRC_URI[sha256sum] =
> "d53216d5f9e3f7803983ac1577d83985dfda33145e4711300f4ad5cbbe
> 
>  EXTRA_OECONF_armv7a = " --enable-neon --disable-static"
>  CFLAGS += " -I${STAGING_INCDIR}/xorg -I${STAGING_INCDIR}/drm"
> -LDFLAGS += "-lm -ldl -lX11 -lGAL-x11"
> 
>  S = "${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/EXA/"


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use
  2013-04-12  9:13 ` Thomas Senyk
@ 2013-04-12 11:44   ` Otavio Salvador
  2013-04-12 15:09     ` Thomas Senyk
  0 siblings, 1 reply; 17+ messages in thread
From: Otavio Salvador @ 2013-04-12 11:44 UTC (permalink / raw)
  To: Thomas Senyk; +Cc: meta-freescale

On Fri, Apr 12, 2013 at 6:13 AM, Thomas Senyk
<thomas.senyk@pelagicore.com> wrote:
> On Thu, April 04, 2013 10:42:16 PM Otavio Salvador wrote:
.>> +            renamed=$backend
>> +            mv $f $(echo $f | sed "s,-$backend\.so,.so,g")
>
> I'd personally rather vote for a symlink then a mv.
> It's nearly the same cost, but it let's people identify which implementation
> is installed (besides other things)

The other uses of libraries with the backend suffix where already
fixed and as we cannot have both backends at same image, working, I
see no gain in duplicate this information. Can you elaborate it a
little more?

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use
  2013-04-12 11:44   ` Otavio Salvador
@ 2013-04-12 15:09     ` Thomas Senyk
  2013-04-12 15:55       ` Otavio Salvador
  0 siblings, 1 reply; 17+ messages in thread
From: Thomas Senyk @ 2013-04-12 15:09 UTC (permalink / raw)
  To: Otavio Salvador; +Cc: meta-freescale

On Fri, April 12, 2013 08:44:05 AM Otavio Salvador wrote:
> On Fri, Apr 12, 2013 at 6:13 AM, Thomas Senyk
> 
> <thomas.senyk@pelagicore.com> wrote:
> > On Thu, April 04, 2013 10:42:16 PM Otavio Salvador wrote:
> .>> +            renamed=$backend
> 
> >> +            mv $f $(echo $f | sed "s,-$backend\.so,.so,g")
> > 
> > I'd personally rather vote for a symlink then a mv.
> > It's nearly the same cost, but it let's people identify which
> > implementation is installed (besides other things)
> 
> The other uses of libraries with the backend suffix where already
> fixed and as we cannot have both backends at same image, working, I
> see no gain in duplicate this information. Can you elaborate it a
> little more?

No strong vote! :)
And it's not duplicate information ... it's just keeping the original 
information (file name) rather then destroying the information (by renaming 
it)

It's just that during development it's nice to see that the 'right' version of 
you egl implementation got deployed.
... otherwise some people (me once in a while) will double-check if the gpu.bb 
toke the right one.

'ls' looks nicer with:
libEGL.so -> libEGL-wl.so
libEGL-wl.so

then just:
libEGL.so

;)

... but again: no strong vote, I can happily live with the current approach ;)

> 
> --
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
> Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use
  2013-04-12 15:09     ` Thomas Senyk
@ 2013-04-12 15:55       ` Otavio Salvador
  0 siblings, 0 replies; 17+ messages in thread
From: Otavio Salvador @ 2013-04-12 15:55 UTC (permalink / raw)
  To: Thomas Senyk; +Cc: meta-freescale

On Fri, Apr 12, 2013 at 12:09 PM, Thomas Senyk
<thomas.senyk@pelagicore.com> wrote:
> On Fri, April 12, 2013 08:44:05 AM Otavio Salvador wrote:
>> On Fri, Apr 12, 2013 at 6:13 AM, Thomas Senyk
>>
>> <thomas.senyk@pelagicore.com> wrote:
>> > On Thu, April 04, 2013 10:42:16 PM Otavio Salvador wrote:
>> .>> +            renamed=$backend
>>
>> >> +            mv $f $(echo $f | sed "s,-$backend\.so,.so,g")
>> >
>> > I'd personally rather vote for a symlink then a mv.
>> > It's nearly the same cost, but it let's people identify which
>> > implementation is installed (besides other things)
>>
>> The other uses of libraries with the backend suffix where already
>> fixed and as we cannot have both backends at same image, working, I
>> see no gain in duplicate this information. Can you elaborate it a
>> little more?
>
> No strong vote! :)
> And it's not duplicate information ... it's just keeping the original
> information (file name) rather then destroying the information (by renaming
> it)
>
> It's just that during development it's nice to see that the 'right' version of
> you egl implementation got deployed.
> ... otherwise some people (me once in a while) will double-check if the gpu.bb
> toke the right one.
>
> 'ls' looks nicer with:
> libEGL.so -> libEGL-wl.so
> libEGL-wl.so
>
> then just:
> libEGL.so
>
> ;)
>
> ... but again: no strong vote, I can happily live with the current approach ;)

This patch has been already merged so if we'd like to change this, it
will need to be another patch.

From Yocto point of view it should not be confusing as it is dependent
of the distro features. Is it possible for you to give current master
(and preferrable with my current patchset) a go and check if all works
for you?

--
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-04-12 15:55 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-05  1:42 [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Otavio Salvador
2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 2/5] xf86-video-imxfb-vivante: Add missing dependency of virtual/xserver Otavio Salvador
2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 3/5] Revert "pointercal-xinput: Add pointercal.xinput to mxs" Otavio Salvador
2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 4/5] gst-plugins-gl: Fix dependency definition Otavio Salvador
2013-04-05  1:42 ` [meta-fsl-arm][PATCH v2 5/5] gst-plugins-gl: Fix build of X11 backend Otavio Salvador
2013-04-05  2:25   ` Philip Craig
2013-04-05  3:07     ` Otavio Salvador
2013-04-05  3:21       ` Philip Craig
2013-04-05 11:20         ` Otavio Salvador
2013-04-05 12:03           ` Philip Craig
2013-04-05 13:41             ` Otavio Salvador
2013-04-05  6:44 ` [meta-fsl-arm][PATCH v2 1/5] gpu-viv-bin-mx6q: Rework package for a single backend use Eric Bénard
2013-04-05 11:23   ` Otavio Salvador
2013-04-12  9:13 ` Thomas Senyk
2013-04-12 11:44   ` Otavio Salvador
2013-04-12 15:09     ` Thomas Senyk
2013-04-12 15:55       ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.