summaryrefslogtreecommitdiffstats
path: root/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend
diff options
context:
space:
mode:
Diffstat (limited to 'bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend')
-rw-r--r--bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend20
1 files changed, 16 insertions, 4 deletions
diff --git a/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend b/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend
index 5ead6251..8d429abf 100644
--- a/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend
+++ b/bsp/meta-freescale/recipes-graphics/mesa/mesa_%.bbappend
@@ -6,7 +6,7 @@ PACKAGECONFIG_remove_imxgpu3d = "gles"
# FIXME: mesa should support 'x11-no-tls' option
python () {
- overrides = d.getVar("OVERRIDES", True).split(":")
+ overrides = d.getVar("OVERRIDES").split(":")
if "imxgpu2d" not in overrides:
return
@@ -14,9 +14,20 @@ python () {
d.setVarFlag("PACKAGECONFIG", "x11", x11flag.replace("--enable-glx-tls", "--enable-glx"))
}
-# Enable Etnaviv support
-PACKAGECONFIG_append_use-mainline-bsp = " gallium"
-GALLIUMDRIVERS_append_use-mainline-bsp = ",etnaviv,imx"
+# Enable Etnaviv and Freedreno support
+PACKAGECONFIG_append_use-mainline-bsp = " gallium etnaviv kmsro freedreno"
+
+USE_OSMESA_ONLY ?= "no"
+
+# Etnaviv support state for i.MX8 is unknown, therefore only enable OSMesa and
+# disable Gallium for now. If you still want to enable Etnaviv, just set
+# USE_OSMESA_ONLY_mx8 = "no" in your bbappend.
+USE_OSMESA_ONLY_mx8 ?= "yes"
+
+# Enable OSMesa which also requires dri (classic) swrast
+PACKAGECONFIG_append = " ${@oe.utils.conditional('USE_OSMESA_ONLY', 'yes', ' osmesa', '', d)}"
+PACKAGECONFIG_remove = " ${@oe.utils.conditional('USE_OSMESA_ONLY', 'yes', 'gallium', '', d)}"
+DRIDRIVERS_append = "${@oe.utils.conditional('USE_OSMESA_ONLY', 'yes', 'swrast', '', d)}"
BACKEND = \
"${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
@@ -27,6 +38,7 @@ BACKEND = \
do_install_append_imxgpu3d () {
rm -f ${D}${libdir}/libGL.* \
${D}${includedir}/GL/gl.h \
+ ${D}${includedir}/GL/glcorearb.h \
${D}${includedir}/GL/glext.h \
${D}${includedir}/GL/glx.h \
${D}${includedir}/GL/glxext.h