From a0ca911a016ca968e7c4f9956be5aff44c35b78b Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Fri, 1 Jul 2016 15:39:44 -0300 Subject: [PATCH] weston: Refactor code to use the new overrides The recipe has been reworked to use the 'imxpxp', 'imxgpu2d' and 'imxgpu3d' feature overrides. While on that, the i.MX6UL specific code has been reworked to used when only PXP-only support is available, fixing the i.MX7D support as well. Change-Id: Ieaae9f95bd7ace58df7bccdab19b42ad35f44f5e Signed-off-by: Otavio Salvador --- recipes-graphics/wayland/weston_%.bbappend | 61 +++++++++++----------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/recipes-graphics/wayland/weston_%.bbappend b/recipes-graphics/wayland/weston_%.bbappend index f7bfd357..1b813abc 100644 --- a/recipes-graphics/wayland/weston_%.bbappend +++ b/recipes-graphics/wayland/weston_%.bbappend @@ -1,50 +1,51 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" -SRC_URI_append_mx6 = " \ +SRC_URI_append_imxgpu2d = " \ 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 \ file://0005-MGS-1252-Fix-for-Qt5_CinematicExperience-will-meet-s.patch \ file://0006-MGS-1236-imx6qp-imx6dl-First-frame-distored-when-som.patch \ file://0007-MGS-1236-1-imx6qp-imx6dl-First-frame-distored-when-s.patch \ - " -PACKAGECONFIG_append_mx6q = " cairo-glesv2" -PACKAGECONFIG_append_mx6dl = " cairo-glesv2" -PACKAGECONFIG_append_mx6sx = " cairo-glesv2" -PACKAGECONFIG_remove_mx6sl = "egl" -PACKAGECONFIG_remove_mx6ul = "egl" - -EXTRA_OECONF_append_mx6 = " \ - --disable-libunwind \ - --disable-xwayland-test \ - WESTON_NATIVE_BACKEND=fbdev-backend.so \ " -EXTRA_OECONF_append_mx6ul = " \ + +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 = "" + +PACKAGECONFIG_append = " ${PACKAGECONFIG_IMX_TO_APPEND}" +PACKAGECONFIG_remove = " ${PACKAGECONFIG_IMX_TO_REMOVE}" + + +EXTRA_OECONF_IMX = " \ --disable-libunwind \ --disable-xwayland-test \ WESTON_NATIVE_BACKEND=fbdev-backend.so \ " -EXTRA_OEMAKE_append_mx6 = " \ +EXTRA_OECONF_append_imxpxp = " ${EXTRA_OECONF_IMX}" +EXTRA_OECONF_append_imxgpu2d = " ${EXTRA_OECONF_IMX}" + +# Use a intermediate step to configure the linking flags +IMXGPU_LIBS = "" +IMXGPU_LIBS_imxgpu2d = " \ + COMPOSITOR_LIBS="-lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \ + FB_COMPOSITOR_LIBS="-lEGL -lwayland-server -lxkbcommon" \ +" +IMXGPU_LIBS_imxgpu3d = " \ + COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \ + FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \ +" + +# Use the linking flags according to the GPU support +EXTRA_OEMAKE_append_imxgpu2d = " \ COMPOSITOR_CFLAGS="-I ${STAGING_INCDIR}/pixman-1 -DLINUX=1 -DEGL_API_FB -DEGL_API_WL" \ FB_COMPOSITOR_CFLAGS="-DLINUX=1 -DEGL_API_FB -DEGL_API_WL" \ SIMPLE_EGL_CLIENT_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \ EGL_TESTS_CFLAGS="-DLINUX -DEGL_API_FB -DEGL_API_WL" \ CLIENT_CFLAGS="-I ${STAGING_INCDIR}/cairo -I ${STAGING_INCDIR}/pixman-1 -DLINUX -DEGL_API_FB -DEGL_API_WL" \ -" -EXTRA_OEMAKE_append_mx6q = " \ - COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \ - FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \ -" -EXTRA_OEMAKE_append_mx6dl = " \ - COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \ - FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \ -" -EXTRA_OEMAKE_append_mx6sx = " \ - COMPOSITOR_LIBS="-lGLESv2 -lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \ - FB_COMPOSITOR_LIBS="-lGLESv2 -lEGL -lwayland-server -lxkbcommon" \ -" -EXTRA_OEMAKE_append_mx6sl = " \ - COMPOSITOR_LIBS="-lEGL -lGAL -lwayland-server -lxkbcommon -lpixman-1" \ - FB_COMPOSITOR_LIBS="-lEGL -lwayland-server -lxkbcommon" \ + \ + ${IMXGPU_LIBS} \ " -- 2.40.1