imx-vpu: Set PACKAGE_ARCH to MACHINE_ARCH
PATCH 1/8 imx-vpu: Set PACKAGE_ARCH to MACHINE_ARCH
The imx-vpu is a machine specific package, as it depends on the kernel for build. We are going to change the PACKAGE_ARCH of it to be MACHINE_SOCARCH as the interface provided by it is stable thus not requring that the library users to be rebuild.
---
recipes-bsp/imx-vpu/imx-vpu.inc | 2 ++ 1 file changed, 2 insertions(+)
recipes-bsp/imx-vpu/imx-vpu.inc +2 -0
@@ -1,3 +1,4 @@ +# Copyright (C) 2013-2016 O.S. Systems Software LTDA. # Copyright (C) 2013 Freescale Semiconductor DESCRIPTION = "Freescale VPU library" LICENSE = "Proprietary"
@@ -19,3 +20,4 @@ do_install () { oe_runmake PLATFORM="${PLATFORM}" DEST_DIR="${D}" install } +PACKAGE_ARCH = "${MACHINE_ARCH}"
Signature · 1 line
2.8.2
PATCH 2/8 imx-base.inc: Fix PACKAGE_ARCH attribution for multimedia libraries
The multimedia libraries offer the APIs for the application and as consequence every user of those libraries should be set as MACHINE_SOCARCH.
This fixes the setting for:
- imx-vpu
- libimxvpuapi
---
conf/machine/include/imx-base.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
conf/machine/include/imx-base.inc +2 -2
@@ -62,8 +62,8 @@ MACHINE_SOCARCH_SUFFIX_vf60 = "-vf60" MACHINE_SOCARCH_SUFFIX_vf50 = "-vf50" MACHINE_SOCARCH_SUFFIX_mx6ul = "-mx6ul" -MACHINE_ARCH_FILTER = "virtual/kernel imx-vpu" -MACHINE_SOCARCH_FILTER_append_mx6 = " imx-codec imx-vpuwrap imx-parser" +MACHINE_ARCH_FILTER = "virtual/kernel" +MACHINE_SOCARCH_FILTER_append_mx6 = " imx-vpu libimxvpuapi imx-codec imx-vpuwrap imx-parser" MACHINE_SOCARCH_FILTER_append_mx6 = " virtual/libopenvg virtual/libgles1 virtual/libgles2 virtual/egl virtual/mesa virtual/libgl virtual/libg2d" INHERIT += "fsl-dynamic-packagearch"
Signature · 1 line
2.8.2
PATCH 3/8 imx-base: Improve sstate signature handling for BSP packages
In reply to Otavio SalvadorThere are BSP packages which can have some dependencies removed from the sstate signature; this is beneficial as it reduces a lot the build time and increases the binaries reuse.
Following changes are done:
- Mark kernel-module-imx-gpu-viv and safe for imx-gpu-viv
- Mark imx-vpu as safe for libimxvpuapi
- Mark imx-vpu as safe for imx-vpuwrap
- Mark imx-vpu as safe for imx-codec
- Mark imx-vpu as safe for imx-test
---
conf/machine/include/imx-base.inc | 8 ++++++++ 1 file changed, 8 insertions(+)
conf/machine/include/imx-base.inc +8 -0
@@ -68,6 +68,14 @@ MACHINE_SOCARCH_FILTER_append_mx6 = " virtual/libopenvg virtual/libgles1 virtual INHERIT += "fsl-dynamic-packagearch" +SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS_append_mx6 = " \ + imx-gpu-viv->kernel-module-imx-gpu-viv \ + libimxvpuapi->imx-vpu \ + imx-vpuwrap->imx-vpu \ + imx-codec->imx-vpu \ + imx-test->imx-vpu \ +" + # Firmware MACHINE_FIRMWARE ?= "" MACHINE_FIRMWARE_append_mx7 = " firmware-imx-epdc"
Signature · 1 line
2.8.2
PATCH 4/8 imx-gpu-viv: Prefer using Wayland over X11 backend
In reply to Otavio SalvadorThe Wayland backend ought to be used over the X11, if both DISTRO_FEATURES are enabled.
---
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +14 -13
@@ -111,19 +111,9 @@ do_install () { install -d ${D}${libdir}/pkgconfig - # The preference order, based in DISTRO_FEATURES, is x11, wayland and fb - if [ "${HAS_X11}" = "yes" ]; then - cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} - cp -r ${S}/apitrace/x11/usr/lib/* ${D}${libdir} - cp -r ${S}/apitrace/x11/usr/bin/* ${D}${bindir} - - backend=x11 - - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_x11.pc ${D}${libdir}/pkgconfig/egl.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm_x11.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2_x11.pc ${D}${libdir}/pkgconfig/glesv2.pc - install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg_x11.pc ${D}${libdir}/pkgconfig/vg.pc - elif [ "${HAS_WL}" = "yes" ]; then + # The preference order, based in DISTRO_FEATURES. The backend + # preference order is Wayland, X11 and Framebuffer. + if [ "${HAS_WL}" = "yes" ]; then cp -r ${S}/apitrace/non-x11/usr/lib/* ${D}${libdir} cp -r ${S}/apitrace/non-x11/usr/bin/* ${D}${bindir}
@@ -136,6 +126,17 @@ do_install () { install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gc_wayland_protocol.pc ${D}${libdir}/pkgconfig/gc_wayland_protocol.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/wayland-egl.pc ${D}${libdir}/pkgconfig/wayland-egl.pc install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/wayland-viv.pc ${D}${libdir}/pkgconfig/wayland-viv.pc + elif [ "${HAS_X11}" = "yes" ]; then + cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir} + cp -r ${S}/apitrace/x11/usr/lib/* ${D}${libdir} + cp -r ${S}/apitrace/x11/usr/bin/* ${D}${bindir} + + backend=x11 + + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_x11.pc ${D}${libdir}/pkgconfig/egl.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm_x11.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2_x11.pc ${D}${libdir}/pkgconfig/glesv2.pc + install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg_x11.pc ${D}${libdir}/pkgconfig/vg.pc else # Regular framebuffer install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc
Signature · 1 line
2.8.2
PATCH 5/8 imx-gpu-viv: Ensure the Wayland backend provides Xorg driver
In reply to Otavio SalvadorFor the XWayland use, we ought to avoid installing the Xorg Vivante driver so we make the Wayland backend to provide it so the runtime dependency is satisfied.
---
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc | 1 + 1 file changed, 1 insertion(+)
recipes-graphics/imx-gpu-viv/imx-gpu-viv.inc +1 -0
@@ -271,6 +271,7 @@ RDEPENDS_libvivante-dri-mx6 = "libdrm" INSANE_SKIP_libwayland-viv-mx6 += "dev-so" FILES_libwayland-viv-mx6 = "${libdir}/libwayland-viv${REALSOLIBS} ${libdir}/libwayland-viv${SOLIBS}" FILES_libwayland-viv-mx6-dev = "${includedir}/wayland-viv ${libdir})/libwayland-viv${SOLIBSDEV} ${libdir}/pkgconfig/wayland-viv.pc" +RPROVIDES_libwayland-viv-mx6 += "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'xf86-video-imxfb-vivante', '', d)}" INSANE_SKIP_libgc-wayland-protocol-mx6 += "dev-so" FILES_libgc-wayland-protocol-mx6 = "${libdir}/libgc_wayland_protocol${REALSOLIBS} ${libdir}/libgc_wayland_protocol${SOLIBS}"
Signature · 1 line
2.8.2
PATCH 6/8 core-image-weston: Remove now that Wayland backend is preferred
In reply to Otavio SalvadorNow that Wayland backend is preferred over X11, we can use this image with X11 DISTRO_FEATURE enabled.
---
recipes-graphics/images/core-image-weston.bbappend | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 recipes-graphics/images/core-image-weston.bbappend
recipes-graphics/images/core-image-weston.bbappend deleted +0 -4
@@ -1,4 +0,0 @@ -# FIXME: Vivante GPU driver cannot operate in X11 and Wayland in same -# distribution as it needs to have different libraries installed. So -# in case 'x11' is in DISTRO_FEATURES, Wayland is disabled. -CONFLICT_DISTRO_FEATURES_append_mx6 = " x11"
Signature · 1 line
2.8.2
PATCH 7/8 kernel-module-imx-gpu-viv: Fix gcc 6 build error -Werror=misleading-indentation
In reply to Otavio SalvadorFrom: Tom Hochstein <[email protected]>
---
...build-error-Werror-misleading-indentation.patch | 30 ++++++++++++++++++++++ .../kernel-module-imx-gpu-viv_5.0.11.p8.3+fslc.bb | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-Fix-gcc-6-build-error-Werror-misleading-indentation.patch
recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-Fix-gcc-6-build-error-Werror-misleading-indentation.patch new file +30 -0
@@ -0,0 +1,30 @@ +From 7e232c0ebb30cb4f99f941daaccb610df0a11cbe Mon Sep 17 00:00:00 2001 +From: Tom Hochstein <[email protected]> +Date: Mon, 16 May 2016 11:30:35 -0500 +Subject: [PATCH] Fix gcc 6 build error -Werror=misleading-indentation + +Upstream-Status: Backport [internal release] + +Signed-off-by: Tom Hochstein <[email protected]> +--- + .../linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c +index e436ada..f8d7233 100644 +--- a/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c ++++ b/kernel-module-imx-gpu-viv-src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6q14.c +@@ -475,8 +475,8 @@ gckPLATFORM_AdjustParam( + + Args->gpu3DMinClock = initgpu3DMinClock; + +- if(Args->physSize == 0) +- Args->physSize = 0x80000000; ++ if (Args->physSize == 0) ++ Args->physSize = 0x80000000; + + return gcvSTATUS_OK; + } +-- +1.9.1 +
recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_5.0.11.p8.3+fslc.bb +2 -1
@@ -10,7 +10,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" PV .= "+git${SRCPV}" SRCREV = "c5473a84cfa44870a8016c7f684d46abcd36a018" -SRC_URI = "git://github.com/Freescale/kernel-module-imx-gpu-viv.git;protocol=https" +SRC_URI = "git://github.com/Freescale/kernel-module-imx-gpu-viv.git;protocol=https \ + file://0001-Fix-gcc-6-build-error-Werror-misleading-indentation.patch" S = "${WORKDIR}/git"
Signature · 1 line
2.8.2
PATCH 8/8 weston: Rebase Vivante patch for Yocto 2.2
In reply to Otavio SalvadorFrom: Tom Hochstein <[email protected]>
---
...d-GPU-VIV-suport-for-wayland-and-weston-1.patch | 92 ++++++++++------------ 1 file changed, 40 insertions(+), 52 deletions(-)
recipes-graphics/wayland/weston/0002-MGS-1111-Add-GPU-VIV-suport-for-wayland-and-weston-1.patch +40 -52
@@ -15,11 +15,11 @@ Signed-off-by: Prabhu <[email protected]> create mode 100644 src/gal2d-renderer.c create mode 100644 src/gal2d-renderer.h -diff --git a/Makefile.am b/Makefile.am -index 62719c9..86d3dfa 100644 ---- a/Makefile.am -+++ b/Makefile.am -@@ -214,6 +214,18 @@ gl_renderer_la_SOURCES = \ +Index: weston-1.10.0/Makefile.am +=================================================================== +--- weston-1.10.0.orig/Makefile.am 2016-05-12 10:52:23.308495113 -0500 ++++ weston-1.10.0/Makefile.am 2016-05-12 10:52:23.524496184 -0500 +@@ -231,6 +231,18 @@ src/vertex-clipping.h \ shared/helpers.h endif
@@ -38,10 +38,10 @@ index 62719c9..86d3dfa 100644 if ENABLE_X11_COMPOSITOR module_LTLIBRARIES += x11-backend.la -diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c -index 81281d0..c6f732e 100644 ---- a/src/compositor-fbdev.c -+++ b/src/compositor-fbdev.c +Index: weston-1.10.0/src/compositor-fbdev.c +=================================================================== +--- weston-1.10.0.orig/src/compositor-fbdev.c 2016-05-12 10:52:21.356485434 -0500 ++++ weston-1.10.0/src/compositor-fbdev.c 2016-05-12 11:41:07.000000000 -0500 @@ -49,6 +49,7 @@ #include "libinput-seat.h" #include "gl-renderer.h"
@@ -50,7 +50,7 @@ index 81281d0..c6f732e 100644 struct fbdev_backend { struct weston_backend base; -@@ -58,7 +59,9 @@ struct fbdev_backend { +@@ -58,7 +59,9 @@ struct udev *udev; struct udev_input input; int use_pixman;
@@ -60,9 +60,9 @@ index 81281d0..c6f732e 100644 }; struct fbdev_screeninfo { -@@ -93,15 +96,20 @@ struct fbdev_output { - pixman_image_t *shadow_surface; - void *shadow_buf; +@@ -91,15 +94,20 @@ + /* pixman details. */ + pixman_image_t *hw_surface; uint8_t depth; + + NativeDisplayType display;
@@ -81,7 +81,7 @@ index 81281d0..c6f732e 100644 static const char default_seat[] = "seat0"; -@@ -476,6 +484,10 @@ fbdev_frame_buffer_destroy(struct fbdev_output *output) +@@ -447,6 +455,10 @@ strerror(errno)); output->fb = NULL;
@@ -92,7 +92,7 @@ index 81281d0..c6f732e 100644 } static void fbdev_output_destroy(struct weston_output *base); -@@ -483,7 +495,7 @@ static void fbdev_output_disable(struct weston_output *base); +@@ -454,7 +466,7 @@ static int fbdev_output_create(struct fbdev_backend *backend,
@@ -101,7 +101,7 @@ index 81281d0..c6f732e 100644 { struct fbdev_output *output; struct weston_config_section *section; -@@ -494,7 +506,7 @@ fbdev_output_create(struct fbdev_backend *backend, +@@ -463,7 +475,7 @@ uint32_t config_transform; char *s;
@@ -110,7 +110,7 @@ index 81281d0..c6f732e 100644 output = zalloc(sizeof *output); if (output == NULL) -@@ -547,7 +559,7 @@ fbdev_output_create(struct fbdev_backend *backend, +@@ -516,7 +528,7 @@ free(s); weston_output_init(&output->base, backend->compositor,
@@ -119,13 +119,11 @@ index 81281d0..c6f732e 100644 output->fb_info.height_mm, config_transform, 1); -@@ -570,10 +582,41 @@ fbdev_output_create(struct fbdev_backend *backend, +@@ -524,10 +536,39 @@ if (backend->use_pixman) { if (pixman_renderer_output_create(&output->base) < 0) - goto out_shadow_surface; -- } else { -+ } -+ else if(backend->use_gal2d) { + goto out_hw_surface; ++ } else if(backend->use_gal2d) { + + char* fbenv = getenv("FB_FRAMEBUFFER_0"); + setenv("FB_FRAMEBUFFER_0", device, 1);
@@ -146,11 +144,10 @@ index 81281d0..c6f732e 100644 + output->display, + (NativeWindowType)output->window) < 0) { + weston_log("gal_renderer_output_create failed.\n"); -+ goto out_shadow_surface; ++ goto out_hw_surface; + } + -+ } -+ else { + } else { setenv("HYBRIS_EGLPLATFORM", "wayland", 1); + output->window = fbCreateWindow(backend->display, -1, -1, 0, 0); + if (output->window == NULL) {
@@ -163,20 +160,16 @@ index 81281d0..c6f732e 100644 gl_renderer->opaque_attribs, NULL, 0) < 0) { weston_log("gl_renderer_output_create failed.\n"); -@@ -634,7 +677,11 @@ fbdev_output_destroy(struct weston_output *base) - free(output->shadow_buf); - output->shadow_buf = NULL; - } -- } else { -+ } -+ else if (backend->use_gal2d) { +@@ -573,6 +614,8 @@ + if (backend->use_pixman) { + if (base->renderer_state != NULL) + pixman_renderer_output_destroy(base); ++ } else if (backend->use_gal2d) { + gal2d_renderer->output_destroy(base); -+ } -+ else { + } else { gl_renderer->output_destroy(base); } - -@@ -697,7 +744,7 @@ fbdev_output_reenable(struct fbdev_backend *backend, +@@ -636,7 +679,7 @@ * are re-initialised. */ device = output->device; fbdev_output_destroy(base);
@@ -185,7 +178,7 @@ index 81281d0..c6f732e 100644 return 0; } -@@ -863,7 +910,50 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv +@@ -789,7 +832,50 @@ if (backend->use_pixman) { if (pixman_renderer_init(compositor) < 0) goto out_launcher;
@@ -237,7 +230,7 @@ index 81281d0..c6f732e 100644 gl_renderer = weston_load_module("gl-renderer.so", "gl_renderer_interface"); if (!gl_renderer) { -@@ -871,17 +961,22 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv +@@ -797,17 +883,22 @@ goto out_launcher; }
@@ -264,7 +257,7 @@ index 81281d0..c6f732e 100644 udev_input_init(&backend->input, compositor, backend->udev, seat_id); -@@ -911,13 +1006,20 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[], +@@ -838,13 +929,20 @@ struct fbdev_parameters param = { .tty = 0, /* default to current tty */ .device = "/dev/fb0", /* default frame buffer */
@@ -286,11 +279,10 @@ index 81281d0..c6f732e 100644 }; parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv); -diff --git a/src/gal2d-renderer.c b/src/gal2d-renderer.c -new file mode 100644 -index 0000000..c68f02c ---- /dev/null -+++ b/src/gal2d-renderer.c +Index: weston-1.10.0/src/gal2d-renderer.c +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ weston-1.10.0/src/gal2d-renderer.c 2016-05-12 11:37:05.000000000 -0500 @@ -0,0 +1,1342 @@ +/* + * Copyright (c) 2015 Freescale Semiconductor, Inc.
@@ -1634,11 +1626,10 @@ index 0000000..c68f02c + .output_create = gal2d_renderer_output_create, + .output_destroy = gal2d_renderer_output_destroy, +}; -diff --git a/src/gal2d-renderer.h b/src/gal2d-renderer.h -new file mode 100644 -index 0000000..279358d ---- /dev/null -+++ b/src/gal2d-renderer.h +Index: weston-1.10.0/src/gal2d-renderer.h +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ weston-1.10.0/src/gal2d-renderer.h 2016-05-12 10:52:23.524496184 -0500 @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2015 Freescale Semiconductor, Inc.
@@ -1690,6 +1681,3 @@ index 0000000..279358d +}; + +#endif --- -2.5.1 -
Signature · 1 line
2.8.2