Skip to contentSkip to conversation

imx-gpu-viv: Don't install GLES package configs on SoCs without 3D

PATCH New Tom Hochstein 1 participant 5 messages Dec 13, 2016 Arm i.MX and Layerscape

lore
Share & tools
lore
#0 lore raw

PATCH 1/5 imx-gpu-viv: Don't install GLES package configs on SoCs without 3D

For SoC's without 3D, imx-gpu-viv doesn't provide a GLES library, so it's wrong to install the corresponding package configs.

---
 recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +1 -1
index 25bd285..e5aacf3 100644
@@ -194,7 +194,7 @@ do_install () {
                \
                ${D}${libdir}/libGL* ${D}${includedir}/GL* \
                \
-               ${D}${libdir}/libGLES* \
+               ${D}${libdir}/libGLES* ${D}${libdir}/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv2.pc \
                \
                ${D}${libdir}/libOpenCL* ${D}${includedir}/CL \
                \
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/5 mesa: Use machine overrides extender

Redo configuration using machine overrides extender.

---
 recipes-graphics/mesa/mesa_%.bbappend | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
recipes-graphics/mesa/mesa_%.bbappend +1 -3
index 2536afd..8f5aa75 100644
@@ -1,9 +1,7 @@
 PACKAGECONFIG_remove_mx6 = "egl gles"
 
 PROVIDES_remove_mx6 = "virtual/libgles1 virtual/libgles2 virtual/libopenvg virtual/egl"
-PROVIDES_remove_mx6q = "virtual/libgl"
-PROVIDES_remove_mx6dl = "virtual/libgl"
-PROVIDES_remove_mx6sx = "virtual/libgl"
+PROVIDES_remove_imxgpu3d = "virtual/libgl"
 
 USE_VIV_LIBGL = "yes"
 USE_VIV_LIBGL_mx6sl = "no"
Signature · 1 line
1.9.1
#2 lore raw

PATCH 3/5 gtk+3: Restore explicit CFLAGS setting

In reply to Tom Hochstein

The package doesn't link against egl, so we can't rely on egl.pc to provide the necessary config settings.

---
 recipes-graphics/gtk+/gtk+3_%.bbappend | 5 +++++
 1 file changed, 5 insertions(+)
recipes-graphics/gtk+/gtk+3_%.bbappend +5 -0
index bc4a404..2f83097 100644
@@ -1,3 +1,8 @@
 PACKAGECONFIG_remove_mx6 = " \
     ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "x11", "", d)} \
 "
+
+CFLAGS_append_mx6 = " \
+    -DLINUX \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-DEGL_API_FB -DEGL_API_WL', '', d)} \
+"
Signature · 1 line
1.9.1
#3 lore raw

PATCH 4/5 weston: Fix build on i.MX 6SL

In reply to Tom Hochstein

Weston requires egl and glesv2 together, or neither. Since the i.MX 6SL can only provide egl, we configure weston to work without egl. A build break occurred due to i.MX patches which should not be applied for 6SL.

---
 recipes-graphics/wayland/weston_%.bbappend | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-graphics/wayland/weston_%.bbappend +1 -1
index dbe87f1..f7b12d0 100644
@@ -1,6 +1,6 @@
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-SRC_URI_append_imxgpu2d = " \
+SRC_URI_append_imxgpu3d = " \
     file://0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch \
     file://0003-MGS-1192-xwld-g2d-compositor-dose-not-work.patch \
     file://0004-MGS-1235-Fix-setenv-and-clear-environments.patch \
Signature · 1 line
1.9.1
#4 lore raw

PATCH 5/5 weston: Add egl and gles support for non-GPU SoCs

In reply to Tom Hochstein

For SoCs with no GPU, configure weston to use the software versions of egl and gles through mesa.

---
 recipes-graphics/wayland/weston_%.bbappend | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
recipes-graphics/wayland/weston_%.bbappend +9 -1
index f7b12d0..b78a299 100644
@@ -17,10 +17,18 @@ SRC_URI_append_imxgpu3d = " \
     file://0016-Link-compositor-to-egl.patch                               \
 "
 
+# The 'egl' configuration of weston requires gles support, and consideration
+# must be taken for the different SoC capabilities:
+# - For SoCs with 3d support, imx-gpu-viv provides hardware-accelerated
+#   egl and gles, so weston egl configuration is enabled.
+# - For SoCs with VG2D, like i.MX 6SoloLite, imx-gpu-viv provides
+#   hardware-accelerated egl but does not provide a compatible software
+#   version of gles, so weston egl configuration is disabled.
+# - For SoCs with no GPU, mesa provides software implementations of egl
+#   and gles, so weston egl configuration is enabled.
 PACKAGECONFIG_IMX_TO_APPEND = ""
 PACKAGECONFIG_IMX_TO_APPEND_imxgpu3d = "cairo-glesv2"
 PACKAGECONFIG_IMX_TO_REMOVE = ""
-PACKAGECONFIG_IMX_TO_REMOVE_imxpxp   = "egl"
 PACKAGECONFIG_IMX_TO_REMOVE_imxgpu2d = "egl"
 PACKAGECONFIG_IMX_TO_REMOVE_imxgpu3d = ""
 
Signature · 1 line
1.9.1