All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0
@ 2017-11-21 12:56 Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 1/8] imx-gpu-apitrace: Move apitrace out of imx-gpu-viv v6 Tom Hochstein
                   ` (7 more replies)
  0 siblings, 8 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

This patchset contains the graphics changes for the i.MX GA release
L4.9.11-1.0.0, plus an update to work with an i.MX fork of
Weston 2.0. GPU drivers are updated to version 6.2.2.p0, with
changes documented in the individual commit.

v3
- eglinfo, libdrm, piglit, xserver-xf86-config: Removed v2
patches that were pushed (Otavio)
- imx-gpu-apitrace: Moved patch files to git repo (Otavio)
- imx-gpu-viv: Restored v5 recipe due to CMA regression (Gary),
regression to be addressed separately (MGS-3436)
- libepoxy: Moved fix to OE-core (Otavio)

v2
- systemd-gpuconfig: Retracted patch
- imx-gpu-viv: Added systemd init, including Fabio's input on systemd-gpuconfig
- core-image-weston: Retracted patch
- libepoxy: Fixed build breaks, per Otavio's request
- weston: Add 2.0 base recipe since master has moved to 3.0

Tom Hochstein (8):
  imx-gpu-apitrace: Move apitrace out of imx-gpu-viv v6
  imx-gpu-g2d: Move imx-gpu-g2d out of imx-gpu-viv v6
  imx-gpu-viv: Upgrade to 6.2.2.p0
  mesa: Remove parts provided by imx-gpu-viv v6
  xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0
  gtk+3: Use egl pkgconfig for build setup
  weston: Switch to 2.0 with i.MX fork
  weston-init: Fix weston 2.0 startup for pam, systemd case

 conf/machine/include/imx-base.inc                  |    8 +-
 recipes-graphics/gtk+/gtk+3_%.bbappend             |    7 +-
 .../imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb     |   23 +
 .../imx-gpu-g2d/imx-gpu-g2d_6.2.2.p0.bb            |   36 +
 recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc     |  315 ++++
 .../imx-gpu-viv/imx-gpu-viv_6.2.2.p0-aarch32.bb    |   12 +
 recipes-graphics/mesa/mesa_%.bbappend              |   20 +-
 recipes-graphics/wayland/weston-init.bbappend      |   23 +
 recipes-graphics/wayland/weston-init/weston.config |    2 +
 .../wayland/weston-init/weston.service             |   37 +
 ...-configuration-option-for-no-input-device.patch |  112 --
 ...2-ccc-Add-GPU-VIV-support-for-weston-1.11.patch |  135 --
 ...1-configure.ac-Fix-wayland-protocols-path.patch |    2 +-
 .../wayland/weston/0001-make-error-portable.patch  |   12 +-
 .../0001-shared-include-stdint.h-for-int32_t.patch |   23 -
 ...ch-Provide-a-default-version-that-doesn-t.patch |   52 +-
 ...1-ccc-Enable-g2d-renderer-for-weston-1.11.patch | 1605 --------------------
 ...ld-Add-clone-mode-support-for-multi-displ.patch |  104 --
 ...68-xwld-System-can-not-boot-up-to-desktop.patch |   44 -
 ...ld-G2D-compositor-build-failed-in-slevk-b.patch |  146 --
 .../weston/0006-Link-compositor-to-egl.patch       |   12 -
 ...d-Fix-crash-when-run-with-no-input-device.patch |   47 -
 recipes-graphics/wayland/weston_1.11.1.bb          |  113 --
 recipes-graphics/wayland/weston_1.11.1.bbappend    |   46 -
 recipes-graphics/wayland/weston_2.0.0.bb           |  113 ++
 recipes-graphics/wayland/weston_2.0.0.bbappend     |   35 +
 .../xorg-driver/xf86-video-imxfb-vivante.inc       |    8 +-
 .../xf86-video-imxfb-vivante_5.0.11.p8.6.bb        |   10 -
 .../xf86-video-imxfb-vivante_6.2.2.p0.bb           |    9 +
 .../kernel-module-imx-gpu-viv_6.2.2.p0.bb          |   16 +
 30 files changed, 683 insertions(+), 2444 deletions(-)
 create mode 100644 recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb
 create mode 100644 recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.2.p0.bb
 create mode 100644 recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
 create mode 100644 recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.2.p0-aarch32.bb
 create mode 100644 recipes-graphics/wayland/weston-init.bbappend
 create mode 100644 recipes-graphics/wayland/weston-init/weston.config
 create mode 100644 recipes-graphics/wayland/weston-init/weston.service
 delete mode 100644 recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
 delete mode 100644 recipes-graphics/wayland/weston/0001-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-1.11.patch
 delete mode 100644 recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
 delete mode 100644 recipes-graphics/wayland/weston/0002-MGS-2521-ccc-Enable-g2d-renderer-for-weston-1.11.patch
 delete mode 100644 recipes-graphics/wayland/weston/0003-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch
 delete mode 100644 recipes-graphics/wayland/weston/0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch
 delete mode 100644 recipes-graphics/wayland/weston/0005-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch
 delete mode 100644 recipes-graphics/wayland/weston/0006-Link-compositor-to-egl.patch
 delete mode 100644 recipes-graphics/wayland/weston/0007-xwayland-Fix-crash-when-run-with-no-input-device.patch
 delete mode 100644 recipes-graphics/wayland/weston_1.11.1.bb
 delete mode 100644 recipes-graphics/wayland/weston_1.11.1.bbappend
 create mode 100644 recipes-graphics/wayland/weston_2.0.0.bb
 create mode 100644 recipes-graphics/wayland/weston_2.0.0.bbappend
 delete mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb
 create mode 100644 recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.2.p0.bb

-- 
1.9.1



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

* [PATCH v3 1/8] imx-gpu-apitrace: Move apitrace out of imx-gpu-viv v6
  2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
@ 2017-11-21 12:56 ` Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 2/8] imx-gpu-g2d: Move imx-gpu-g2d " Tom Hochstein
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 .../imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb     | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb

diff --git a/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb
new file mode 100644
index 0000000..e5e9a4a
--- /dev/null
+++ b/recipes-graphics/imx-gpu-apitrace/imx-gpu-apitrace_7.1.0.bb
@@ -0,0 +1,23 @@
+SUMMARY = "Samples for OpenGL ES"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=aeb969185a143c3c25130bc2c3ef9a50"
+DEPENDS = "virtual/libg2d imx-gpu-viv zlib libpng procps"
+
+SRC_URI = "git://source.codeaurora.org/external/imx/apitrace-imx.git;protocol=https;branch=imx_7.1"
+SRCREV = "759c5b7a004d1807e15a7f587023dc2e459b3509"
+
+S = "${WORKDIR}/git"
+
+inherit cmake lib_package pkgconfig perlnative pythonnative
+
+EXTRA_OECMAKE += "-DENABLE_VIVANTE=ON -DENABLE_MULTIARCH=OFF"
+EXTRA_OECMAKE += \
+    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-DDISABLE_X11=ON', \
+        bb.utils.contains('DISTRO_FEATURES',     'x11', '', \
+                                                        '-DDISABLE_X11=ON', d), d)}"
+
+FILES_${PN} = "${bindir} ${libdir}"
+FILES_${PN}-dbg += "${libdir}/*/*/.debug"
+
+PACKAGE_ARCH = "${MACHINE_SOCARCH}"
+COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)"
-- 
1.9.1



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

* [PATCH v3 2/8] imx-gpu-g2d: Move imx-gpu-g2d out of imx-gpu-viv v6
  2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 1/8] imx-gpu-apitrace: Move apitrace out of imx-gpu-viv v6 Tom Hochstein
@ 2017-11-21 12:56 ` Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 3/8] imx-gpu-viv: Upgrade to 6.2.2.p0 Tom Hochstein
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 conf/machine/include/imx-base.inc                  |  2 +-
 .../imx-gpu-g2d/imx-gpu-g2d_6.2.2.p0.bb            | 36 ++++++++++++++++++++++
 2 files changed, 37 insertions(+), 1 deletion(-)
 create mode 100644 recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.2.p0.bb

diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index f5df54e..1dbe148 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -212,7 +212,7 @@ PREFERRED_PROVIDER_virtual/libgl_mx6ul ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgl_mx6ull ?= "mesa"
 PREFERRED_PROVIDER_virtual/libgl_mx7ulp ?= "imx-gpu-viv"
 
-PREFERRED_PROVIDER_virtual/libg2d_mx6 ?= "imx-gpu-viv"
+PREFERRED_PROVIDER_virtual/libg2d_mx6 ?= "imx-gpu-g2d"
 PREFERRED_PROVIDER_virtual/libg2d_mx6sll ?= ""
 PREFERRED_PROVIDER_virtual/libg2d_mx6ul = ""
 PREFERRED_PROVIDER_virtual/libg2d_mx6ull = ""
diff --git a/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.2.p0.bb b/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.2.p0.bb
new file mode 100644
index 0000000..8be05f9
--- /dev/null
+++ b/recipes-graphics/imx-gpu-g2d/imx-gpu-g2d_6.2.2.p0.bb
@@ -0,0 +1,36 @@
+# Copyright (C) 2016 Freescale Semiconductor
+# Copyright 2017 NXP
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "GPU G2D library and apps for imx6"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://COPYING;md5=08fd295cce89b0a9c74b9b83ed74f671"
+
+PROVIDES += "virtual/libg2d"
+
+SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
+
+S="${WORKDIR}/${PN}-${PV}"
+
+inherit fsl-eula-unpack
+
+SRC_URI[md5sum] = "64720dda9b96fd7af5be7e2c654ab72a"
+SRC_URI[sha256sum] = "070a95aa9942bd67e8ba4012962df74143bffb9998301ac097dab5e1437000d8"
+
+do_install () {
+
+    install -d ${D}${libdir}
+    install -d ${D}${includedir}
+
+    cp ${S}/g2d/usr/lib/*.so* ${D}${libdir}
+    cp -Pr ${S}/g2d/usr/include/* ${D}${includedir}
+    cp -r ${S}/gpu-demos/opt ${D}
+}
+
+RDEPENDS_${PN} = "libgal-imx"
+
+FILES_${PN} = "${libdir}/libg2d* /opt"
+FILES_${PN}-dev = "${includedir}"
+INSANE_SKIP_${PN} = "ldflags"
+
+COMPATIBLE_MACHINE = "(mx6|mx7ulp)"
-- 
1.9.1



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

* [PATCH v3 3/8] imx-gpu-viv: Upgrade to 6.2.2.p0
  2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 1/8] imx-gpu-apitrace: Move apitrace out of imx-gpu-viv v6 Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 2/8] imx-gpu-g2d: Move imx-gpu-g2d " Tom Hochstein
@ 2017-11-21 12:56 ` Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 4/8] mesa: Remove parts provided by imx-gpu-viv v6 Tom Hochstein
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

Key Features of the Vivante 6.2.2.p0 Driver Series

- Full support for Khronos Vulkan 1.0 API and WSI extension APIs
Vulkan is a new generation graphics and compute API that provides
high-efficiency, cross-platform access to modern GPUs used in a wide
variety of devices. Vivante’s Vulkan 1.0 implementation has passed
Khronos Vulkan 1.0 Conformance Test. Vivante GC7000XS* GPU core has
been certified by Khronos as a Vulkan 1.0 compliant product.
- Full support for Khronos OpenGL ES 3.2 API
The new OpenGL ES 3.2 and OpenGL ES Shading Language 3.20
specifications bring AEP, plus additional functionality, into core
OpenGL ES. Vivante OpenGL ES 3.2 implementation has passed Khronos
OpenGL ES 3.2 Conformance Test. And Vivante GC7000XS* GPU core has
been certified by Khronos as an OpenGL ES 3.2 compliant product.
- Draw calls specifying a base vertex parameter
- Floating-point framebuffers
- Robust buffer access control
- Support for querying CONTEXT_FLAGS, as needed by debug and robust buffer access functionality.
- Khronos OpenVX 1.0.1 API
- Khronos OpenCL 1.2 API

Improvements

1. Added mutex protection for referencing gctSIGNAL in gckOS_MapSignal to fix a MT race issue.
2. Streamlined GPU address calculation base on MC20 (0/1) and MMU (0/1) combinations.
3. Fixed multiple Android HWC 2.0 rendering issues. Refined HWC 2.0 driver implementation.
4. Improved HWC2.0 composition performance by composing damaged regions only.
6. Enabled offline/online compiler IR assembly dump function for users.
7. Implemented the direct rendering support (no-resolve) for Wayland platform.
8. Added EGL_EXT_buffer_age extension for Wayland and fbdev platforms.
9. Updated wayland-viv protocol to support tile status sync from client to server.
10. Improved OpenCL 1.2 builtin function support with native GPU instructions.
11. Enabled OpenCL 1.2 API trace dump function controlled by VIV_TRACE environment variable.
12. Support for OpenGL4.0
13. Cleaned up driver code issues reported by Klocwork and Coverity.

Changes and Bug Fixes

VG3D:   MGS-2972 fix 3D OpenVG render target orientation
EGL:    MGS-2790 6sx-sdb Met memory dump when do xwld stress test
EGL:    MGS-2885 fix recursive call to dequeue buffer issue on wayland
EGL:    MGS-2785 Meet segmentation fault when test qt5nmapper on wayland
EGL:    MGS-2734 fix x11 memory leak issue
Gralloc:MA-9561 fix crash issue on new gralloc1 interface.
2D:     MGS-2900 fix filterblt memory leak
VG2D/6SL: MGS-2882 fix video memory allocator
OCL:    MGS-2732 clCopyImage with max_images in OCL1.1 cts, crashes.
GLES:   MGS-2747 enable the full config for ES3 CTS
GLES:   MGS-1832 fix Mirada performance issue. optimize cpu load for fence check
WEBGL:  MGS-2779 webgl 1.0.2 conformance test met out of memory
General:MGS-2923 fix gc2000 gpu hang when flush TS cache
General:MGS-2907 fix wrong cache invalidate with dma_map_area
General:MGS-2902 fix wrong release_mem_region
General:MGS-2848 fix gpu hang for flat mapping optimization
General:MGS-2848 Optimize MMUv1 FlatMapping performances
General:MGS-2857 fix spinlock in gpu kernel driver
General:MGS-2805 Enable gcdENABLE_VG by default.
General:MGS-2827 fix serious performance drop on imx6q
General:MGS-2832 fix axi bus error with correct baseaddress
General:MA-9483  Refine android native fence code to match 4.9 kernel
General:MA-9473 Fix gpu random crash issue caused by NULL pointer
General:MGS-2804 fix flat mapping overflow issue
General:MGS-2786 fix gpu kernel panic with debugfs
General:GS-2776  fix galcore device open failure
General:MGS-2767 i.MX7ULP GPU suspend/resume problem
Coverity:MGS-2858 Double free in __driUtilUpdateExtraDrawableInfo

Known Issues

         OpenCL 1.1 CTS failures. Will be addresed in 6.2.3
MGS-3436 Mx6:GPU-VIV-6.x: does not work with 4GiB of RAM
MGS-3027 GPU: X11 manywin draw error. 100%
MGS-2935 [imx6QP] X11: glxs app test some frames render incorrectly. 100%
MGS-2860 [MX7ULP/imx6SLEVK] X11/Xwld: XWindow 2D Acceleration performance test met "X Error of failed request: BadMatch (invalid parameter attributes)" error. 100%
MGS-2829 [imx6qp/imx6d] xwld: mm06 Samurai and Proxycon performance regression comparing with L4.1 using 5.0.11p8
MGS-2310 [imx6qp/imx6dq/imx6dl/imx6sx] webgl: two items performance data is lower than L4.1_GA
MGS-1828 [imx6qp_sd/imx6Q/imx6dl] X11/xwld: VGMARK on vg3d have some items performance drop comparing with L4.1 GA
MGS-1350 [imx6qp-sd] X/FB: Some Basemark test items performance drop comparing with L3.14.52GA which use 5.0.11p7

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc     | 315 +++++++++++++++++++++
 .../imx-gpu-viv/imx-gpu-viv_6.2.2.p0-aarch32.bb    |  12 +
 .../kernel-module-imx-gpu-viv_6.2.2.p0.bb          |  16 ++
 3 files changed, 343 insertions(+)
 create mode 100644 recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
 create mode 100644 recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.2.p0-aarch32.bb
 create mode 100644 recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.2.p0.bb

diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
new file mode 100644
index 0000000..b6f5f24
--- /dev/null
+++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
@@ -0,0 +1,315 @@
+# Copyright (C) 2012-2016 Freescale Semiconductor
+# Copyright (C) 2012-2016 O.S. Systems Software LTDA.
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+DESCRIPTION = "GPU driver and apps for i.MX"
+SECTION = "libs"
+LICENSE = "Proprietary"
+LIC_FILES_CHKSUM = "file://COPYING;md5=08fd295cce89b0a9c74b9b83ed74f671"
+
+DEPENDS += " \
+    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
+       bb.utils.contains('DISTRO_FEATURES',     'x11', 'virtual/libx11 libxdamage libxext libxfixes', \
+                                                       '', d), d)} \
+"
+DEPENDS += "libdrm"
+
+# imx-gpu-viv does not provide everything it needs to for virtual/libgl
+# on x11 backend or on Wayland backend with XWayland support.
+# We depend on mesa to fill in what is missing.
+DEPENDS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'mesa', '', d)}"
+
+EXTRA_PROVIDES = ""
+EXTRA_PROVIDES_append_imxgpu3d = " virtual/libgl virtual/libgles1 virtual/libgles2"
+EXTRA_PROVIDES_append_mx6q     = " virtual/opencl-icd opencl-headers"
+PROVIDES += "imx-gpu-viv virtual/wayland-egl virtual/libgal-x11 virtual/egl virtual/libopenvg ${EXTRA_PROVIDES}"
+
+RPROVIDES_${PN}_imxgpu3d += "imx-gpu-viv"
+
+PE = "1"
+
+inherit fsl-eula-unpack
+
+SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.bin;fsl-eula=true"
+
+# Note : If you add a package here, to prevent a naming conflict see the python_anonymous() futher below
+PACKAGES =+ "libclc-imx libclc-imx-dev \
+	libgl-imx libgl-imx-dev \
+	libgles-imx libgles-imx-dev \
+	libgles2-imx libgles2-imx-dev \
+	libgles3-imx-dev \
+	libglslc-imx libglslc-imx-dev \
+	libopencl-imx libopencl-imx-dev \
+	libopenvg-imx libopenvg-imx-dev \
+	libvdk-imx libvdk-imx-dev \
+	libegl-imx libegl-imx-dev \
+	libgal-imx libgal-imx-dev \
+	libvivante-dri-imx \
+	libvsc-imx \
+	libgbm-imx libgbm-imx-dev \
+	libwayland-viv-imx libwayland-viv-imx-dev \
+	libgc-wayland-protocol-imx libgc-wayland-protocol-imx-dev \
+	libwayland-egl-imx-dev \
+	imx-gpu-viv-tools \
+	imx-gpu-viv-demos \
+	libvulkan-imx libvulkan-imx-dev \
+	libopenvx-imx libopenvx-imx-dev \
+"
+python __anonymous () {
+        has_vivante_kernel_driver_support = (d.getVar('MACHINE_HAS_VIVANTE_KERNEL_DRIVER_SUPPORT', True) or '0')
+        if has_vivante_kernel_driver_support != '1':
+                raise bb.parse.SkipPackage('The kernel of machine needs to have Vivante kernel driver support for this recipe to be used.')
+}
+
+USE_X11 = "${@bb.utils.contains("DISTRO_FEATURES", "x11", "yes", "no", d)}"
+USE_WL = "${@bb.utils.contains("DISTRO_FEATURES", "wayland", "yes", "no", d)}"
+
+# Inhibit warnings about files being stripped.
+INHIBIT_PACKAGE_STRIP = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
+
+# FIXME: The provided binary doesn't provide soname. If in future BSP
+# release the libraries are fixed, we can drop this hack.
+REALSOLIBS := "${SOLIBS}"
+SOLIBS = "${SOLIBSDEV}"
+
+# For the packages that make up the OpenGL interfaces, inject variables so that
+# they don't get Debian-renamed (which would remove the -imx suffix).
+#
+# FIXME: All binaries lack GNU_HASH in elf binary but as we don't have
+# the source we cannot fix it. Disable the insane check for now.
+python __anonymous() {
+    packages = d.getVar('PACKAGES', True).split()
+    for p in packages:
+        d.appendVar("INSANE_SKIP_%s" % p, " ldflags")
+
+    for p in (("libegl", "libegl1"), ("libgl", "libgl1"),
+              ("libgles1", "libglesv1-cm1"), ("libgles2", "libglesv2-2"),
+              ("libgles3",) , ("libvulkan",)):
+        fullp = p[0] + "-imx"
+        pkgs = " ".join(p)
+        d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
+        d.appendVar("RREPLACES_" + fullp, pkgs)
+        d.appendVar("RPROVIDES_" + fullp, pkgs)
+        d.appendVar("RCONFLICTS_" + fullp, pkgs)
+
+        # For -dev, the first element is both the Debian and original name
+        fullp += "-dev"
+        pkgs = p[0] + "-dev"
+        d.setVar("DEBIAN_NOAUTONAME_" + fullp, "1")
+        d.appendVar("RREPLACES_" + fullp, pkgs)
+        d.appendVar("RPROVIDES_" + fullp, pkgs)
+        d.appendVar("RCONFLICTS_" + fullp, pkgs)
+}
+
+IS_MX6SL = "0"
+IS_MX6SL_mx6sl = "1"
+
+do_install () {
+    install -d ${D}${libdir}
+    install -d ${D}${includedir}
+    install -d ${D}${bindir}
+
+    cp -P ${S}/gpu-core/usr/lib/*.so* ${D}${libdir}
+    cp -r ${S}/gpu-core/usr/include/* ${D}${includedir}
+    cp -r ${S}/gpu-demos/opt ${D}
+    cp -r ${S}/gpu-tools/gmem-info/usr/bin/* ${D}${bindir}
+
+
+    install -d ${D}${libdir}/pkgconfig
+
+    # The preference order, based in DISTRO_FEATURES, is Wayland (with or without X11), X11 and fb
+    if [ "${USE_WL}" = "yes" ]; then
+
+        backend=wl
+
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_wayland.pc ${D}${libdir}/pkgconfig/egl.pc
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc
+        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
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gbm.pc ${D}${libdir}/pkgconfig/gbm.pc
+
+       if [ "${USE_X11}" = "yes" ]; then
+
+        cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir}
+
+       fi
+
+    elif [ "${USE_X11}" = "yes" ]; then
+
+        cp -r ${S}/gpu-core/usr/lib/dri ${D}${libdir}
+
+        backend=x11
+
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/gl_x11.pc ${D}${libdir}/pkgconfig/gl.pc
+        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
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv1_cm.pc ${D}${libdir}/pkgconfig/glesv1_cm.pc
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/glesv2.pc ${D}${libdir}/pkgconfig/glesv2.pc
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/vg.pc ${D}${libdir}/pkgconfig/vg.pc
+
+        # Regular framebuffer
+        install -m 0644 ${S}/gpu-core/usr/lib/pkgconfig/egl_linuxfb.pc ${D}${libdir}/pkgconfig/egl.pc
+
+        backend=fb
+
+    fi
+
+    # Install Vendor ICDs for OpenCL's installable client driver loader (ICDs Loader)
+    install -d ${D}${sysconfdir}/OpenCL/vendors/
+    install -m 0644 ${S}/gpu-core/etc/Vivante.icd ${D}${sysconfdir}/OpenCL/vendors/Vivante.icd
+
+    # We'll only have one backend here so we rename it to generic name
+    # and avoid rework in other packages, when possible
+    mv ${D}${libdir}/libGL.so.1.2 ${D}${libdir}/libGL.so.1.2.0
+    ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1.2
+    ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so.1
+    ln -sf libGL.so.1.2.0 ${D}${libdir}/libGL.so
+    mv ${D}${libdir}/libEGL-${backend}.so ${D}${libdir}/libEGL.so.1.0
+    ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so.1
+    ln -sf libEGL.so.1.0 ${D}${libdir}/libEGL.so
+    mv ${D}${libdir}/libGAL-${backend}.so ${D}${libdir}/libGAL.so
+    mv ${D}${libdir}/libVDK-${backend}.so ${D}${libdir}/libVDK.so
+
+    # update libglesv2 as backend dependent
+    rm -rf ${D}${libdir}/libGLESv2*
+    cp ${S}/gpu-core/usr/lib/libGLESv2-${backend}.so ${D}${libdir}/libGLESv2.so.2.0.0
+    ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so.2
+    ln -sf libGLESv2.so.2.0.0 ${D}${libdir}/libGLESv2.so
+
+    # skip packaging wayland libraries if no support is requested
+    if [ "${USE_WL}" = "no" ]; then
+        rm ${D}${libdir}/libgc_wayland_protocol.*
+        rm ${D}${libdir}/libwayland-viv.*
+    fi
+
+    for i in wl x11 fb dri; do
+        find ${D}${libdir} -name "*-$i.so" -exec rm '{}' ';'
+        find ${D}${libdir} -name "*.$i.so" -exec rm '{}' ';'
+    done
+
+    # FIXME: MX6SL does not have 3D support; hack it for now
+    if [ "${IS_MX6SL}" = "1" ]; then
+        rm -rf ${D}${libdir}/libCLC* ${D}${includedir}/CL \
+               \
+               ${D}${libdir}/libGL* ${D}${includedir}/GL* ${D}${libdir}/pkgconfig/gl.pc \ 
+               \
+               ${D}${libdir}/libGLES* ${D}${libdir}/pkgconfig/gles*.pc \
+               \
+               ${D}${libdir}/libOpenCL* ${D}${includedir}/CL \
+               \
+               ${D}${libdir}/libOpenVG.3d.so \
+               \
+               ${D}${libdir}/libVivanteOpenCL.so \
+               \
+               ${D}/opt/viv_samples/vdk \
+               ${D}/opt/viv_samples/es20 ${D}/opt/viv_samples/cl11
+
+        ln -sf libOpenVG.2d.so ${D}${libdir}/libOpenVG.so
+    fi
+
+    find ${D}${libdir} -type f -exec chmod 644 {} \;
+    find ${D}${includedir} -type f -exec chmod 644 {} \;
+
+    chown -R root:root "${D}"
+}
+
+ALLOW_EMPTY_${PN} = "1"
+
+# FIXME: Remove the following lines after adding libopenvx package
+INSANE_SKIP_imx-gpu-viv-dev += "dev-elf"
+INSANE_SKIP_libclc-imx += "dev-deps"
+
+FILES_libclc-imx = "${libdir}/libCLC${SOLIBS}"
+FILES_libclc-imx-dev = "${includedir}/CL ${libdir}/libCLC${SOLIBSDEV}"
+
+# libEGL.so is used by some demo apps from Freescale
+INSANE_SKIP_libegl-imx += "dev-so"
+FILES_libegl-imx = "${libdir}/libEGL${REALSOLIBS} ${libdir}/libEGL${SOLIBSDEV} "
+FILES_libegl-imx-dev = "${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
+RDEPENDS_libegl-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgc-wayland-protocol-imx libwayland-viv-imx libgc-wayland-protocol-imx', '', d)}"
+RDEPENDS_libegl-imx-dev += "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libwayland-egl-imx-dev', '', d)}"
+
+FILES_libgal-imx = "${libdir}/libGAL${SOLIBS} ${libdir}/libGAL_egl${SOLIBS}"
+FILES_libgal-imx-dev = "${libdir}/libGAL${SOLIBSDEV} ${includedir}/HAL"
+RDEPENDS_libgal-imx += "kernel-module-imx-gpu-viv"
+RPROVIDES_libgal-imx += "libgal-imx"
+INSANE_SKIP_libgal-imx += "build-deps"
+
+FILES_libvsc-imx = "${libdir}/libVSC${SOLIBS}"
+
+FILES_libgbm-imx = "${libdir}/libgbm${SOLIBS} ${libdir}/gbm_viv${SOLIBS}"
+FILES_libgbm-imx-dev = "${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${libdir}/libgbm${SOLIBSDEV}"
+RDEPENDS_libgbm-imx += "libdrm"
+
+FILES_libvulkan-imx = "${libdir}/vulkan/libvulkan_VSI${SOLIBS}"
+FILES_libvulkan-imx-dev = "${includedir}/vulkan ${libdir}/vulkan/libvulkan_VSI${SOLIBSDEV}"
+INSANE_SKIP_libvulkan-imx += "dev-deps dev-so"
+
+FILES_libopenvx-imx = "${libdir}/libOpenVX${SOLIBS} ${libdir}/libOpenVXC${SOLIBS} ${libdir}/libOpenVXU${SOLIBS}"
+FILES_libopenvx-imx-dev = "${includedir}/VX ${libdir}/libopenVX${SOLIBSDEV}"
+
+FILES_libgl-imx = "${libdir}/libGL${REALSOLIBS}"
+FILES_libgl-imx-dev = "${libdir}/libGL${SOLIBSDEV} ${includedir}/GL"
+# Includes GL headers from mesa
+RDEPENDS_libgl-imx-dev += "libgl-mesa-dev"
+
+# libEGL needs to open libGLESv1.so
+INSANE_SKIP_libgles-imx += "dev-so"
+FILES_libgles-imx = "${libdir}/libGLESv1*${REALSOLIBS} ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${REALSOLIBS} ${libdir}/libGLES_*${SOLIBS}"
+FILES_libgles-imx-dev = "${includedir}/GLES ${libdir}/libGLESv1*${SOLIBS} ${libdir}/libGLES_*${SOLIBSDEV} ${libdir}/pkgconfig/glesv1_cm.pc"
+
+# libEGL needs to open libGLESv2.so
+INSANE_SKIP_libgles2-imx += "dev-so"
+FILES_libgles2-imx = "${libdir}/libGLESv2${REALSOLIBS} ${libdir}/libGLESv2${SOLIBS}"
+FILES_libgles2-imx-dev = "${includedir}/GLES2 ${libdir}/libGLESv2${SOLIBSDEV} ${libdir}/pkgconfig/glesv2.pc"
+RDEPENDS_libgles2-imx = "libglslc-imx"
+
+FILES_libgles3-imx-dev = "${includedir}/GLES3"
+# as long as there is no libgles3: ship libgles3-dev along with
+# libgles2-dev - otherwise GLES3 headers have to be added manually
+RDEPENDS_libgles2-imx-dev += "libgles3-imx-dev"
+
+FILES_libglslc-imx = "${libdir}/libGLSLC${SOLIBS}"
+FILES_libglslc-imx-dev = "${includedir}/CL ${libdir}/libGLSLC${SOLIBSDEV}"
+
+FILES_libopencl-imx = "${libdir}/libOpenCL${SOLIBS} \
+                       ${libdir}/libVivanteOpenCL${SOLIBS} \
+                       ${sysconfdir}/OpenCL/vendors/Vivante.icd"
+FILES_libopencl-imx-dev = "${includedir}/CL ${libdir}/libOpenCL${SOLIBSDEV}"
+RDEPENDS_libopencl-imx= "libclc-imx"
+
+INSANE_SKIP_libopenvg-imx += "dev-so"
+FILES_libopenvg-imx = "${libdir}/libOpenVG*${SOLIBS}"
+FILES_libopenvg-imx-dev = "${includedir}/VG ${libdir}/libOpenVG*${SOLIBSDEV} ${libdir}/pkgconfig/vg.pc"
+
+FILES_libvdk-imx = "${libdir}/libVDK${SOLIBS}"
+FILES_libvdk-imx-dev = "${includedir}/*vdk*.h ${libdir}/libVDK${SOLIBSDEV}"
+
+FILES_libvivante-dri-imx = "${libdir}/dri/vivante_dri.so"
+RDEPENDS_libvivante-dri-imx = "libdrm"
+
+INSANE_SKIP_libwayland-viv-imx += "dev-so"
+FILES_libwayland-viv-imx =  "${libdir}/libwayland-viv${REALSOLIBS}  ${libdir}/libwayland-viv${SOLIBS}"
+FILES_libwayland-viv-imx-dev = "${includedir}/wayland-viv ${libdir})/libwayland-viv${SOLIBSDEV} ${libdir}/pkgconfig/wayland-viv.pc"
+RPROVIDES_libwayland-viv-imx += "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'xf86-video-imxfb-vivante', '', d)}"
+
+INSANE_SKIP_libgc-wayland-protocol-imx += "dev-so"
+FILES_libgc-wayland-protocol-imx = "${libdir}/libgc_wayland_protocol${REALSOLIBS} ${libdir}/libgc_wayland_protocol${SOLIBS}"
+FILES_libgc-wayland-protocol-imx-dev = "${libdir}/libgc_wayland_protocol${SOLIBSDEV} ${libdir}/pkgconfig/gc_wayland_protocol.pc"
+
+FILES_libwayland-egl-imx-dev = "${libdir}/pkgconfig/wayland-egl.pc"
+
+FILES_imx-gpu-viv-tools = "${bindir}/gmem_info"
+
+FILES_imx-gpu-viv-demos = "/opt"
+INSANE_SKIP_imx-gpu-viv-demos += "rpaths dev-deps"
+
+# COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl)"
diff --git a/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.2.p0-aarch32.bb b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.2.p0-aarch32.bb
new file mode 100644
index 0000000..9f3b7cc
--- /dev/null
+++ b/recipes-graphics/imx-gpu-viv/imx-gpu-viv_6.2.2.p0-aarch32.bb
@@ -0,0 +1,12 @@
+# Copyright (C) 2013-2016 Freescale Semiconductor
+# Copyright 2017 NXP
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require recipes-graphics/imx-gpu-viv/imx-gpu-viv-6.inc
+
+SRC_URI[md5sum] = "7d43f73b8bc0c1c442587f819218a1d5"
+SRC_URI[sha256sum] = "4f93a4412c93ca5959aa2437bfed2ecbaf983b5b272be5977f76a967de5db150"
+
+PACKAGE_FP_TYPE = "hardfp"
+
+COMPATIBLE_MACHINE = "(mx6q|mx6dl|mx6sx|mx6sl|mx7ulp)"
diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.2.p0.bb b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.2.p0.bb
new file mode 100644
index 0000000..8bf61dc
--- /dev/null
+++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.2.2.p0.bb
@@ -0,0 +1,16 @@
+# Copyright (C) 2015-2016 Freescale Semiconductor
+# Copyright 2017 NXP
+
+SUMMARY = "Kernel loadable module for Vivante GPU"
+DESCRIPTION = "Builds the Vivante GPU kernel driver as a loadable kernel module, \
+allowing flexibility to use an older kernel with a newer graphics release."
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
+
+SRC_URI = "${FSL_MIRROR}/${PN}-${PV}.tar.gz"
+SRC_URI[md5sum] = "c5922730046c159fd5055ad114e027b9"
+SRC_URI[sha256sum] = "01b13fa5e1ab69475ce401e997fe8e42775b7792b1233e871b2b28555f8a3a66"
+
+inherit module
+
+KERNEL_MODULE_AUTOLOAD = "galcore"
-- 
1.9.1



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

* [PATCH v3 4/8] mesa: Remove parts provided by imx-gpu-viv v6
  2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
                   ` (2 preceding siblings ...)
  2017-11-21 12:56 ` [PATCH v3 3/8] imx-gpu-viv: Upgrade to 6.2.2.p0 Tom Hochstein
@ 2017-11-21 12:56 ` Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0 Tom Hochstein
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 recipes-graphics/mesa/mesa_%.bbappend | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/recipes-graphics/mesa/mesa_%.bbappend b/recipes-graphics/mesa/mesa_%.bbappend
index a89184e..74396ae 100644
--- a/recipes-graphics/mesa/mesa_%.bbappend
+++ b/recipes-graphics/mesa/mesa_%.bbappend
@@ -1,6 +1,6 @@
-PACKAGECONFIG_remove_imxgpu2d = "egl gles"
+PACKAGECONFIG_remove_imxgpu2d = "egl gles gbm"
 
-PROVIDES_remove_imxgpu2d = "virtual/libgles1 virtual/libgles2 virtual/libopenvg virtual/egl"
+PROVIDES_remove_imxgpu2d = "virtual/libgles1 virtual/libgles2 virtual/libopenvg virtual/egl gbm"
 PROVIDES_remove_imxgpu3d = "virtual/libgl"
 
 # FIXME: mesa should support 'x11-no-tls' option
@@ -17,11 +17,25 @@ python () {
 PACKAGECONFIG_append_use-mainline-bsp = " gallium"
 GALLIUMDRIVERS_append_use-mainline-bsp = ",etnaviv,imx"
 
+BACKEND = \
+    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', \
+        bb.utils.contains('DISTRO_FEATURES',     'x11',     'x11', \
+                                                             'fb', d), d)}"
+
 # FIXME: Dirty hack to allow use of Vivante GPU libGL binary
 do_install_append_imxgpu3d () {
     rm -f ${D}${libdir}/libGL.* \
           ${D}${includedir}/GL/gl.h \
-          ${D}${includedir}/GL/glext.h
+          ${D}${includedir}/GL/glext.h \
+          ${D}${includedir}/GL/glx.h \
+          ${D}${includedir}/GL/glxext.h
+    if [ "${BACKEND}" = "x11" ]; then
+        rm -f ${D}${libdir}/pkgconfig/gl.pc
+    fi
+}
+
+do_install_append_imxgpu2d () {
+    rm -f ${D}${libdir}/pkgconfig/wayland-egl.pc
 }
 
 do_install_append_imxgpu2d () {
-- 
1.9.1



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

* [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0
  2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
                   ` (3 preceding siblings ...)
  2017-11-21 12:56 ` [PATCH v3 4/8] mesa: Remove parts provided by imx-gpu-viv v6 Tom Hochstein
@ 2017-11-21 12:56 ` Tom Hochstein
  2017-12-07  9:55   ` Stefan Agner
  2017-11-21 12:56 ` [PATCH v3 6/8] gtk+3: Use egl pkgconfig for build setup Tom Hochstein
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc      |  8 +++-----
 .../xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb        | 10 ----------
 .../xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb           |  9 +++++++++
 3 files changed, 12 insertions(+), 15 deletions(-)
 delete mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb
 create mode 100644 recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb

diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc
index a6d722b..c16da67 100644
--- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc
+++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc
@@ -8,7 +8,7 @@ PE = "3"
 
 inherit autotools-brokensep update-rc.d pkgconfig
 
-DEPENDS += "virtual/xserver virtual/libx11 virtual/libgal-x11 imx-gpu-viv pixman"
+DEPENDS += "virtual/xserver virtual/libx11 virtual/libgal-x11 imx-gpu-viv virtual/libg2d pixman"
 
 LIC_FILES_CHKSUM = "file://COPYING-MIT;md5=b5e9d9f5c02ea831ab3ecf802bb7c4f3"
 
@@ -32,8 +32,6 @@ CFLAGS += "-I${STAGING_INCDIR}/xorg \
            -I${STAGING_INCDIR}/drm \
            -I../../DRI_1.10.4/src"
 
-S = "${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/"
-
 PACKAGES =+ "xserver-xorg-extension-viv-autohdmi"
 
 # FIXME: The Freescale provided Makefile has hardcodec include paths
@@ -55,7 +53,7 @@ do_install_append () {
 	find ${D}${includedir} -type f -exec chmod 660 {} \;
 }
 
-RDEPENDS_${PN} += "libvivante-dri-mx6 \
+RDEPENDS_${PN} += "libvivante-dri-imx \
                    xserver-xorg-module-exa \
                    mesa-driver-swrast \
                    xserver-xorg-extension-dri \
@@ -72,4 +70,4 @@ FILES_${PN}-dbg = "${libdir}/*/*/*/.debug ${libdir}/.debug/libfsl_x11_ext${SOLIB
 FILES_xserver-xorg-extension-viv-autohdmi = " ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/autohdmi ${sysconfdir}/init.d/rc.autohdmi"
 
 PACKAGE_ARCH = "${MACHINE_SOCARCH}"
-COMPATIBLE_MACHINE = "(mx6)"
+COMPATIBLE_MACHINE = "(mx6|mx7ulp)"
diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb
deleted file mode 100644
index a15033e..0000000
--- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (C) 2012-2016 Freescale Semiconductor
-# Copyright (C) 2012-2014 O.S. Systems Software LTDA.
-# Released under the MIT license (see COPYING.MIT for the terms)
-
-require xf86-video-imxfb-vivante.inc
-
-SRC_URI += "file://Stop-using-Git-to-write-local-version.patch"
-
-SRCBRANCH = "nxp/imx_4.9.11_1.0.0_ga"
-SRCREV = "07ef065dfe09f1c05a1a188c371577faa3677a17"
diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb
new file mode 100644
index 0000000..5514962
--- /dev/null
+++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb
@@ -0,0 +1,9 @@
+# Copyright (C) 2012-2016 Freescale Semiconductor
+# Copyright (C) 2012-2014 O.S. Systems Software LTDA.
+# Copyright 2017 NXP
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+require xf86-video-imxfb-vivante.inc
+
+SRCBRANCH = "nxp/imx_4.9.11_1.0.0_ga"
+SRCREV = "07ef065dfe09f1c05a1a188c371577faa3677a17"
-- 
1.9.1



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

* [PATCH v3 6/8] gtk+3: Use egl pkgconfig for build setup
  2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
                   ` (4 preceding siblings ...)
  2017-11-21 12:56 ` [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0 Tom Hochstein
@ 2017-11-21 12:56 ` Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 7/8] weston: Switch to 2.0 with i.MX fork Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 8/8] weston-init: Fix weston 2.0 startup for pam, systemd case Tom Hochstein
  7 siblings, 0 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 recipes-graphics/gtk+/gtk+3_%.bbappend | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/recipes-graphics/gtk+/gtk+3_%.bbappend b/recipes-graphics/gtk+/gtk+3_%.bbappend
index 7377c2c..be2bac7 100644
--- a/recipes-graphics/gtk+/gtk+3_%.bbappend
+++ b/recipes-graphics/gtk+/gtk+3_%.bbappend
@@ -1,8 +1,5 @@
+DEPENDS_append_imxgpu2d = " virtual/egl"
+
 PACKAGECONFIG_remove_imxgpu2d = " \
     ${@bb.utils.contains("DISTRO_FEATURES", "wayland", "x11", "", d)} \
 "
-
-CFLAGS_append_imxgpu2d = " \
-    -DLINUX \
-    ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', '-DEGL_API_FB -DEGL_API_WL', '', d)} \
-"
-- 
1.9.1



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

* [PATCH v3 7/8] weston: Switch to 2.0 with i.MX fork
  2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
                   ` (5 preceding siblings ...)
  2017-11-21 12:56 ` [PATCH v3 6/8] gtk+3: Use egl pkgconfig for build setup Tom Hochstein
@ 2017-11-21 12:56 ` Tom Hochstein
  2017-11-21 12:56 ` [PATCH v3 8/8] weston-init: Fix weston 2.0 startup for pam, systemd case Tom Hochstein
  7 siblings, 0 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

EGL support was removed from the fbdev compositor in Weston 2.0. Add
it back via an i.MX fork.

This has been verified with imx-gpu-viv v6 only.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 conf/machine/include/imx-base.inc                  |    6 +-
 ...-configuration-option-for-no-input-device.patch |  112 --
 ...2-ccc-Add-GPU-VIV-support-for-weston-1.11.patch |  135 --
 ...1-configure.ac-Fix-wayland-protocols-path.patch |    2 +-
 .../wayland/weston/0001-make-error-portable.patch  |   12 +-
 .../0001-shared-include-stdint.h-for-int32_t.patch |   23 -
 ...ch-Provide-a-default-version-that-doesn-t.patch |   52 +-
 ...1-ccc-Enable-g2d-renderer-for-weston-1.11.patch | 1605 --------------------
 ...ld-Add-clone-mode-support-for-multi-displ.patch |  104 --
 ...68-xwld-System-can-not-boot-up-to-desktop.patch |   44 -
 ...ld-G2D-compositor-build-failed-in-slevk-b.patch |  146 --
 .../weston/0006-Link-compositor-to-egl.patch       |   12 -
 ...d-Fix-crash-when-run-with-no-input-device.patch |   47 -
 recipes-graphics/wayland/weston_1.11.1.bb          |  113 --
 recipes-graphics/wayland/weston_1.11.1.bbappend    |   46 -
 recipes-graphics/wayland/weston_2.0.0.bb           |  113 ++
 recipes-graphics/wayland/weston_2.0.0.bbappend     |   35 +
 17 files changed, 187 insertions(+), 2420 deletions(-)
 delete mode 100644 recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
 delete mode 100644 recipes-graphics/wayland/weston/0001-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-1.11.patch
 delete mode 100644 recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
 delete mode 100644 recipes-graphics/wayland/weston/0002-MGS-2521-ccc-Enable-g2d-renderer-for-weston-1.11.patch
 delete mode 100644 recipes-graphics/wayland/weston/0003-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch
 delete mode 100644 recipes-graphics/wayland/weston/0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch
 delete mode 100644 recipes-graphics/wayland/weston/0005-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch
 delete mode 100644 recipes-graphics/wayland/weston/0006-Link-compositor-to-egl.patch
 delete mode 100644 recipes-graphics/wayland/weston/0007-xwayland-Fix-crash-when-run-with-no-input-device.patch
 delete mode 100644 recipes-graphics/wayland/weston_1.11.1.bb
 delete mode 100644 recipes-graphics/wayland/weston_1.11.1.bbappend
 create mode 100644 recipes-graphics/wayland/weston_2.0.0.bb
 create mode 100644 recipes-graphics/wayland/weston_2.0.0.bbappend

diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index 1dbe148..2d89bdb 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -218,6 +218,8 @@ PREFERRED_PROVIDER_virtual/libg2d_mx6ul = ""
 PREFERRED_PROVIDER_virtual/libg2d_mx6ull = ""
 PREFERRED_PROVIDER_virtual/libg2d_mx7ulp ?= "imx-gpu-viv"
 
+PREFERRED_VERSION_weston_imxgpu2d = "2.0.0"
+
 # Handle default kernel
 IMX_DEFAULT_KERNEL = "linux-imx"
 IMX_DEFAULT_KERNEL_mxs = "linux-fslc"
@@ -263,9 +265,5 @@ KERNEL_IMAGETYPE = "zImage"
 
 MACHINE_FEATURES = "usbgadget usbhost vfat alsa touchscreen"
 
-# Use weston 1.11.1 for mx6 and mx7 machines
-PREFERRED_VERSION_weston_mx6 = "1.11.1"
-PREFERRED_VERSION_weston_mx7 = "1.11.1"
-
 # Add the ability to specify _imx machines
 MACHINEOVERRIDES =. "imx:"
diff --git a/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch b/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
deleted file mode 100644
index c45f3ad..0000000
--- a/recipes-graphics/wayland/weston/0001-Add-configuration-option-for-no-input-device.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 75b7197f4e072a4e2de124ddbe93b85cffb1c0f8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
-Date: Fri, 21 Oct 2016 14:03:13 -0500
-Subject: [PATCH] Add configuration option for no input device.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-As it has been discussed in the past [1], running Weston
-without any input device at launch might be beneficial for
-some use cases.
-
-Certainly, it's best for the vast majority of users (and
-the project) to require an input device to be present, as
-to avoid frustration and hassle, but for those brave souls
-that so prefer, this patch lets them run without any input
-device at all.
-
-This introduces a simple configuration in weston.ini:
-  [core]
-  require-input=true
-
-True is the default, so no behavioral change is introduced.
-
-[1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
-
-Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
-Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
-Reviewed-by: Daniel Stone <daniels@collabora.com>
-
-Upstream-Status: backport from
-https://cgit.freedesktop.org/wayland/weston/commit/?id=75b7197f
----
- man/weston.ini.man  |    5 +++++
- src/compositor.h    |    3 +++
- src/libinput-seat.c |    6 ++++++
- src/main.c          |    5 +++++
- weston.ini.in       |    1 +
- 5 files changed, 20 insertions(+)
-
---- a/src/main.c
-+++ b/src/main.c
-@@ -1298,6 +1298,7 @@ int main(int argc, char *argv[])
- 	struct wl_client *primary_client;
- 	struct wl_listener primary_client_destroyed;
- 	struct weston_seat *seat;
-+      int require_input;
- 
- 	const struct weston_option core_options[] = {
- 		{ WESTON_OPTION_STRING, "backend", 'B', &backend },
-@@ -1373,6 +1374,10 @@ int main(int argc, char *argv[])
- 	if (weston_compositor_init_config(ec, config) < 0)
- 		goto out;
- 
-+	weston_config_section_get_bool(section, "require-input",
-+				       &require_input, true);
-+	ec->require_input = require_input;
-+
- 	if (load_backend(ec, backend, &argc, argv, config) < 0) {
- 		weston_log("fatal: failed to create compositor backend\n");
- 		goto out;
---- a/src/compositor.h
-+++ b/src/compositor.h
-@@ -803,6 +803,9 @@ struct weston_compositor {
- 
- 	void *user_data;
- 	void (*exit)(struct weston_compositor *c);
-+
-+	/* Whether to let the compositor run without any input device. */
-+	bool require_input;
- };
- 
- struct weston_buffer {
---- a/src/libinput-seat.c
-+++ b/src/libinput-seat.c
-@@ -255,6 +255,12 @@ udev_input_enable(struct udev_input *inp
- 			devices_found = 1;
- 	}
- 
-+	if (devices_found == 0 && !c->require_input) {
-+		weston_log("warning: no input devices found, but none required "
-+			   "as per configuration.\n");
-+		return 0;
-+	}
-+
- 	if (devices_found == 0) {
- 		weston_log(
- 			"warning: no input devices on entering Weston. "
---- a/man/weston.ini.man
-+++ b/man/weston.ini.man
-@@ -169,6 +169,11 @@ time, the one specified in the command-l
- hand, if none of these sets the value, default idle timeout will be
- set to 300 seconds.
- .RS
-+.PP
-+.RE
-+.TP 7
-+.BI "require-input=" true
-+require an input device for launch
- 
- .SH "LIBINPUT SECTION"
- The
---- a/weston.ini.in
-+++ b/weston.ini.in
-@@ -2,6 +2,7 @@
- #modules=xwayland.so,cms-colord.so
- #shell=desktop-shell.so
- #gbm-format=xrgb2101010
-+#require-input=true
- 
- [shell]
- background-image=/usr/share/backgrounds/gnome/Aqua.jpg
diff --git a/recipes-graphics/wayland/weston/0001-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-1.11.patch b/recipes-graphics/wayland/weston/0001-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-1.11.patch
deleted file mode 100644
index 37a2d4c..0000000
--- a/recipes-graphics/wayland/weston/0001-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-1.11.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From dfad4d734412e4ec53bfff29c7c503479857f66c Mon Sep 17 00:00:00 2001
-From: Meng Mingming <mingming.meng@nxp.com>
-Date: Mon, 9 Jan 2017 15:04:27 +0800
-Subject: [PATCH 1/5] MGS-2352 [#ccc] Add GPU-VIV support for weston 1.11
-
-Add GPU-VIV support for weston 1.11
-
-Upstream Status: Inappropriate [i.MX specific]
-
-Date: Jan 09, 2017
-Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
----
- src/compositor-fbdev.c | 37 ++++++++++++++++++++++++++++---------
- 1 file changed, 28 insertions(+), 9 deletions(-)
-
-diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
-index ee762e3..06f4696 100644
---- a/src/compositor-fbdev.c
-+++ b/src/compositor-fbdev.c
-@@ -61,6 +61,7 @@ struct fbdev_backend {
- 	int use_pixman;
- 	uint32_t output_transform;
- 	struct wl_listener session_listener;
-+	NativeDisplayType display;
- };
- 
- struct fbdev_screeninfo {
-@@ -93,6 +94,9 @@ struct fbdev_output {
- 	/* pixman details. */
- 	pixman_image_t *hw_surface;
- 	uint8_t depth;
-+
-+	NativeDisplayType display;
-+	NativeWindowType  window;
- };
- 
- struct gl_renderer_interface *gl_renderer;
-@@ -443,6 +447,10 @@ fbdev_frame_buffer_destroy(struct fbdev_output *output)
- 		           strerror(errno));
- 
- 	output->fb = NULL;
-+	if(output->window)
-+		fbDestroyWindow(output->window);
-+	if(output->display)
-+		fbDestroyDisplay(output->display);
- }
- 
- static void fbdev_output_destroy(struct weston_output *base);
-@@ -450,13 +458,13 @@ static void fbdev_output_disable(struct weston_output *base);
- 
- static int
- fbdev_output_create(struct fbdev_backend *backend,
--                    const char *device)
-+                   int x, int y, const char *device)
- {
- 	struct fbdev_output *output;
- 	int fb_fd;
- 	struct wl_event_loop *loop;
- 
--	weston_log("Creating fbdev output.\n");
-+	weston_log("Creating fbdev output. %s x=%d y=%d\n", device, x, y);
- 
- 	output = zalloc(sizeof *output);
- 	if (output == NULL)
-@@ -500,7 +508,7 @@ fbdev_output_create(struct fbdev_backend *backend,
- 	output->base.name = strdup("fbdev");
- 
- 	weston_output_init(&output->base, backend->compositor,
--	                   0, 0, output->fb_info.width_mm,
-+	                   x, y, output->fb_info.width_mm,
- 	                   output->fb_info.height_mm,
- 	                   backend->output_transform,
- 			   1);
-@@ -510,8 +518,13 @@ fbdev_output_create(struct fbdev_backend *backend,
- 			goto out_hw_surface;
- 	} else {
- 		setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
-+		output->window = fbCreateWindow(backend->display, -1, -1, 0, 0);
-+		if (output->window == NULL) {
-+			fprintf(stderr, "failed to create window\n");
-+			return 0;
-+		}
- 		if (gl_renderer->output_create(&output->base,
--					       (EGLNativeWindowType)NULL, NULL,
-+					       (EGLNativeWindowType)output->window, NULL,
- 					       gl_renderer->opaque_attribs,
- 					       NULL, 0) < 0) {
- 			weston_log("gl_renderer_output_create failed.\n");
-@@ -622,7 +635,7 @@ fbdev_output_reenable(struct fbdev_backend *backend,
- 		 * are re-initialised. */
- 		device = strdup(output->device);
- 		fbdev_output_destroy(&output->base);
--		fbdev_output_create(backend, device);
-+		fbdev_output_create(backend, 0, 0, device);
- 		free(device);
- 
- 		return 0;
-@@ -785,17 +798,21 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
- 			goto out_launcher;
- 		}
- 
-+		backend->display = fbGetDisplay(backend->compositor->wl_display);
-+		if (backend->display == NULL) {
-+			weston_log("fbGetDisplay failed.\n");
-+			goto out_launcher;
-+		}
- 		if (gl_renderer->create(compositor, NO_EGL_PLATFORM,
--					EGL_DEFAULT_DISPLAY,
-+					backend->display,
- 					gl_renderer->opaque_attribs,
- 					NULL, 0) < 0) {
- 			weston_log("gl_renderer_create failed.\n");
- 			goto out_launcher;
- 		}
- 	}
--
--	if (fbdev_output_create(backend, param->device) < 0)
--		goto out_launcher;
-+	if (fbdev_output_create(backend, 0, 0, param->device) < 0)
-+			goto out_launcher;
- 
- 	udev_input_init(&backend->input, compositor, backend->udev, seat_id);
- 
-@@ -844,6 +861,8 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
- 	config_init_to_defaults(&config);
- 	memcpy(&config, config_base, config_base->struct_size);
- 
-+	config.use_gl = 1;
-+
- 	b = fbdev_backend_create(compositor, argc, argv, wc, &config);
- 	if (b == NULL)
- 		return -1;
--- 
-2.7.4
-
diff --git a/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch b/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
index edd3b91..5f4d79c 100644
--- a/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
+++ b/recipes-graphics/wayland/weston/0001-configure.ac-Fix-wayland-protocols-path.patch
@@ -21,7 +21,7 @@ Upstream-Status: Inappropriate [embedded specific]
 @@ -187,7 +187,7 @@ PKG_CHECK_MODULES(LIBINPUT_BACKEND, [lib
  PKG_CHECK_MODULES(COMPOSITOR, [$COMPOSITOR_MODULES])
  
- PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.2],
+ PKG_CHECK_MODULES(WAYLAND_PROTOCOLS, [wayland-protocols >= 1.7],
 -		  [ac_wayland_protocols_pkgdatadir=`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
 +		  [ac_wayland_protocols_pkgdatadir=${WAYLAND_PROTOCOLS_SYSROOT_DIR}`$PKG_CONFIG --variable=pkgdatadir wayland-protocols`])
  AC_SUBST(WAYLAND_PROTOCOLS_DATADIR, $ac_wayland_protocols_pkgdatadir)
diff --git a/recipes-graphics/wayland/weston/0001-make-error-portable.patch b/recipes-graphics/wayland/weston/0001-make-error-portable.patch
index f7b5284..e2213ac 100644
--- a/recipes-graphics/wayland/weston/0001-make-error-portable.patch
+++ b/recipes-graphics/wayland/weston/0001-make-error-portable.patch
@@ -10,9 +10,9 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
 ---
 Upstream-Status: Submitted
 
- configure.ac        |    2 ++
- src/weston-error.h  |   20 ++++++++++++++++++++
- src/weston-launch.c |    2 +-
+ configure.ac              |    2 ++
+ libweston/weston-error.h  |   20 ++++++++++++++++++++
+ libweston/weston-launch.c |    2 +-
  3 files changed, 23 insertions(+), 1 deletion(-)
  create mode 100644 src/weston-error.h
 
@@ -28,7 +28,7 @@ Upstream-Status: Submitted
  
  COMPOSITOR_MODULES="wayland-server >= $WAYLAND_PREREQ_VERSION pixman-1 >= 0.25.2"
 --- /dev/null
-+++ b/src/weston-error.h
++++ b/libweston/weston-error.h
 @@ -0,0 +1,20 @@
 +#ifndef _WESTON_ERROR_H
 +#define _WESTON_ERROR_H
@@ -50,8 +50,8 @@ Upstream-Status: Submitted
 +
 +#endif
 +
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
 @@ -33,7 +33,6 @@
  #include <poll.h>
  #include <errno.h>
diff --git a/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch b/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
deleted file mode 100644
index ee66c20..0000000
--- a/recipes-graphics/wayland/weston/0001-shared-include-stdint.h-for-int32_t.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From ba02b8abe4e2afac2bfbf2559972d5059d75a041 Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Date: Sat, 16 Jul 2016 22:50:19 +0300
-Subject: [PATCH weston] shared: include stdint.h for int32_t
-
-This fixes build on musl.
-
-Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
-Upstream-Status: Submitted
----
- shared/xalloc.h |    1 +
- 1 file changed, 1 insertion(+)
-
---- a/shared/xalloc.h
-+++ b/shared/xalloc.h
-@@ -30,6 +30,7 @@
- extern "C" {
- #endif
- 
-+#include <stdint.h>
- #include <stdlib.h>
- #include <string.h>
- 
diff --git a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
index d684b1c..70b9888 100644
--- a/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
+++ b/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -1,6 +1,6 @@
-From d02226b3d5872b184c1d50c7f4706ac9467ffb81 Mon Sep 17 00:00:00 2001
+From 8ff6ed03ec4079f32e9b34085414e57be4730e04 Mon Sep 17 00:00:00 2001
 From: Tom Hochstein <tom.hochstein@nxp.com>
-Date: Fri, 15 Jul 2016 11:00:15 +0300
+Date: Wed, 22 Feb 2017 15:53:30 +0200
 Subject: [PATCH] weston-launch: Provide a default version that doesn't require
  PAM
 
@@ -13,14 +13,17 @@ without non-root-user support.
 Upstream-Status: Pending
 
 Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
 ---
- configure.ac        |    9 +++++++--
- src/weston-launch.c |   20 ++++++++++++++++++++
+ configure.ac              |  9 +++++++--
+ libweston/weston-launch.c | 20 ++++++++++++++++++++
  2 files changed, 27 insertions(+), 2 deletions(-)
 
+diff --git a/configure.ac b/configure.ac
+index 46cb2c7..bb45f46 100644
 --- a/configure.ac
 +++ b/configure.ac
-@@ -416,13 +416,17 @@ AC_ARG_ENABLE(resize-optimization,
+@@ -435,13 +435,17 @@ AC_ARG_ENABLE(resize-optimization,
  AS_IF([test "x$enable_resize_optimization" = "xyes"],
        [AC_DEFINE([USE_RESIZE_POOL], [1], [Use resize memory pool as a performance optimization])])
  
@@ -28,11 +31,11 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
 +            AS_HELP_STRING([--with-pam], [Use PAM]),
 +            [use_pam=$withval], [use_pam=yes])
  AC_ARG_ENABLE(weston-launch, [  --enable-weston-launch],, enable_weston_launch=yes)
- AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
--if test x$enable_weston_launch == xyes; then
+ AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch = xyes)
+-if test x$enable_weston_launch = xyes; then
 +if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then
    WESTON_SEARCH_LIBS([PAM], [pam], [pam_open_session], [have_pam=yes], [have_pam=no])
-   if test x$have_pam == xno; then
+   if test x$have_pam = xno; then
 -    AC_ERROR([weston-launch requires pam])
 +    AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found])
    fi
@@ -40,7 +43,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  fi
  
  AM_CONDITIONAL(HAVE_PANGO, test "x$have_pango" = "xyes")
-@@ -673,6 +677,7 @@ AC_MSG_RESULT([
+@@ -701,6 +705,7 @@ AC_MSG_RESULT([
  	Enable developer documentation	${enable_devdocs}
  
  	weston-launch utility		${enable_weston_launch}
@@ -48,8 +51,10 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  	systemd-login support		${have_systemd_login}
  	systemd notify support		${enable_systemd_notify}
  
---- a/src/weston-launch.c
-+++ b/src/weston-launch.c
+diff --git a/libweston/weston-launch.c b/libweston/weston-launch.c
+index 0491896..07e7469 100644
+--- a/libweston/weston-launch.c
++++ b/libweston/weston-launch.c
 @@ -51,7 +51,9 @@
  
  #include <pwd.h>
@@ -71,7 +76,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  	int tty;
  	int ttynr;
  	int sock[2];
-@@ -181,6 +185,7 @@ weston_launch_allowed(struct weston_laun
+@@ -181,6 +185,7 @@ weston_launch_allowed(struct weston_launch *wl)
  	return false;
  }
  
@@ -87,7 +92,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  
  static int
  setup_launcher_socket(struct weston_launch *wl)
-@@ -414,6 +420,7 @@ quit(struct weston_launch *wl, int statu
+@@ -414,6 +420,7 @@ quit(struct weston_launch *wl, int status)
  	close(wl->signalfd);
  	close(wl->sock[0]);
  
@@ -95,7 +100,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  	if (wl->new_user) {
  		err = pam_close_session(wl->ph, 0);
  		if (err)
-@@ -421,6 +428,7 @@ quit(struct weston_launch *wl, int statu
+@@ -421,6 +428,7 @@ quit(struct weston_launch *wl, int status)
  				err, pam_strerror(wl->ph, err));
  		pam_end(wl->ph, err);
  	}
@@ -103,7 +108,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  
  	if (ioctl(wl->tty, KDSKBMUTE, 0) &&
  	    ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
-@@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl)
+@@ -600,6 +608,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
  	setenv("HOME", wl->pw->pw_dir, 1);
  	setenv("SHELL", wl->pw->pw_shell, 1);
  
@@ -111,15 +116,15 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  	env = pam_getenvlist(wl->ph);
  	if (env) {
  		for (i = 0; env[i]; ++i) {
-@@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl)
+@@ -608,6 +617,7 @@ setup_session(struct weston_launch *wl, char **child_argv)
  		}
  		free(env);
  	}
 +#endif
- }
  
- static void
-@@ -665,7 +675,9 @@ static void
+ 	/*
+ 	 * We open a new session, so it makes sense
+@@ -675,7 +685,9 @@ static void
  help(const char *name)
  {
  	fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
@@ -129,7 +134,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  	fprintf(stderr, "  -t, --tty       Start session on alternative tty\n");
  	fprintf(stderr, "  -v, --verbose   Be verbose\n");
  	fprintf(stderr, "  -h, --help      Display this help message\n");
-@@ -678,7 +690,9 @@ main(int argc, char *argv[])
+@@ -688,7 +700,9 @@ main(int argc, char *argv[])
  	int i, c;
  	char *tty = NULL;
  	struct option opts[] = {
@@ -139,7 +144,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  		{ "tty",     required_argument, NULL, 't' },
  		{ "verbose", no_argument,       NULL, 'v' },
  		{ "help",    no_argument,       NULL, 'h' },
-@@ -690,9 +704,13 @@ main(int argc, char *argv[])
+@@ -700,9 +714,13 @@ main(int argc, char *argv[])
  	while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) {
  		switch (c) {
  		case 'u':
@@ -153,7 +158,7 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  			break;
  		case 't':
  			tty = optarg;
-@@ -732,8 +750,10 @@ main(int argc, char *argv[])
+@@ -740,8 +758,10 @@ main(int argc, char *argv[])
  	if (setup_tty(&wl, tty) < 0)
  		exit(EXIT_FAILURE);
  
@@ -164,3 +169,6 @@ Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
  
  	if (setup_launcher_socket(&wl) < 0)
  		exit(EXIT_FAILURE);
+-- 
+2.1.4
+
diff --git a/recipes-graphics/wayland/weston/0002-MGS-2521-ccc-Enable-g2d-renderer-for-weston-1.11.patch b/recipes-graphics/wayland/weston/0002-MGS-2521-ccc-Enable-g2d-renderer-for-weston-1.11.patch
deleted file mode 100644
index 858cb81..0000000
--- a/recipes-graphics/wayland/weston/0002-MGS-2521-ccc-Enable-g2d-renderer-for-weston-1.11.patch
+++ /dev/null
@@ -1,1605 +0,0 @@
-From 1995ec08267c8063ca72590e700c8612b04a63b5 Mon Sep 17 00:00:00 2001
-From: Meng Mingming <mingming.meng@nxp.com>
-Date: Mon, 16 Jan 2017 10:15:02 +0800
-Subject: [PATCH 2/5] MGS-2521 [#ccc] Enable g2d-renderer for weston 1.11
-
-Enable g2d-renderer for weston 1.11
-weston-start -- --use-g2d=1(--use-gl=1) $OPTARGS
-
-Upstream Status: Inappropriate [i.MX specific]
-
-Date: Jan 16, 2017
-Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
----
- Makefile.am            |   16 +
- src/compositor-fbdev.c |   66 ++-
- src/compositor-fbdev.h |    1 +
- src/g2d-renderer.c     | 1317 ++++++++++++++++++++++++++++++++++++++++++++++++
- src/g2d-renderer.h     |   47 ++
- src/main.c             |    6 +-
- 6 files changed, 1448 insertions(+), 5 deletions(-)
- create mode 100644 src/g2d-renderer.c
- create mode 100644 src/g2d-renderer.h
-
-diff --git a/Makefile.am b/Makefile.am
-index 00b74e5..a044b64 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -248,6 +248,22 @@ gl_renderer_la_SOURCES =			\
- 	shared/helpers.h
- endif
- 
-+module_LTLIBRARIES += g2d-renderer.la
-+g2d_renderer_la_LDFLAGS = -module -avoid-version
-+g2d_renderer_la_LIBADD = $(COMPOSITOR_LIBS) $(EGL_LIBS) -lg2d
-+g2d_renderer_la_CFLAGS =                       \
-+       $(COMPOSITOR_CFLAGS)                    \
-+       $(EGL_CFLAGS)                           \
-+       $(GCC_CFLAGS) -DHAVE_G2D
-+g2d_renderer_la_SOURCES =                      \
-+       src/g2d-renderer.h                      \
-+       src/g2d-renderer.c                      \
-+       src/vertex-clipping.c                   \
-+       src/vertex-clipping.h
-+if ENABLE_EGL
-+g2d_renderer_la_CFLAGS += -DENABLE_EGL
-+endif
-+
- if ENABLE_X11_COMPOSITOR
- module_LTLIBRARIES += x11-backend.la
- x11_backend_la_LDFLAGS = -module -avoid-version
-diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
-index 06f4696..cff9513 100644
---- a/src/compositor-fbdev.c
-+++ b/src/compositor-fbdev.c
-@@ -50,6 +50,7 @@
- #include "libinput-seat.h"
- #include "gl-renderer.h"
- #include "presentation-time-server-protocol.h"
-+#include "g2d-renderer.h"
- 
- struct fbdev_backend {
- 	struct weston_backend base;
-@@ -59,6 +60,7 @@ struct fbdev_backend {
- 	struct udev *udev;
- 	struct udev_input input;
- 	int use_pixman;
-+	int use_g2d;
- 	uint32_t output_transform;
- 	struct wl_listener session_listener;
- 	NativeDisplayType display;
-@@ -100,6 +102,7 @@ struct fbdev_output {
- };
- 
- struct gl_renderer_interface *gl_renderer;
-+struct g2d_renderer_interface *g2d_renderer;
- 
- static const char default_seat[] = "seat0";
- 
-@@ -516,6 +519,14 @@ fbdev_output_create(struct fbdev_backend *backend,
- 	if (backend->use_pixman) {
- 		if (pixman_renderer_output_create(&output->base) < 0)
- 			goto out_hw_surface;
-+	} else if(backend->use_g2d) {
-+		const char *g2d_device = device;
-+
-+		if (g2d_renderer->output_create(&output->base,
-+							backend->compositor->wl_display, g2d_device) < 0) {
-+				weston_log("g2d_renderer_output_create failed.\n");
-+				goto out_hw_surface;
-+		}
- 	} else {
- 		setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
- 		output->window = fbCreateWindow(backend->display, -1, -1, 0, 0);
-@@ -571,6 +582,8 @@ fbdev_output_destroy(struct weston_output *base)
- 	if (backend->use_pixman) {
- 		if (base->renderer_state != NULL)
- 			pixman_renderer_output_destroy(base);
-+	} else if(backend->use_g2d) {
-+		g2d_renderer->output_destroy(base);
- 	} else {
- 		gl_renderer->output_destroy(base);
- 	}
-@@ -782,7 +795,8 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
- 	backend->base.restore = fbdev_restore;
- 
- 	backend->prev_state = WESTON_COMPOSITOR_ACTIVE;
--	backend->use_pixman = !param->use_gl;
-+	backend->use_pixman = !(param->use_gl || param->use_g2d);
-+	backend->use_g2d = param->use_g2d;
- 	backend->output_transform = param->output_transform;
- 
- 	weston_setup_vt_switch_bindings(compositor);
-@@ -790,6 +804,46 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
- 	if (backend->use_pixman) {
- 		if (pixman_renderer_init(compositor) < 0)
- 			goto out_launcher;
-+	} else if(backend->use_g2d) {
-+		int x = 0, y = 0;
-+		int i=0;
-+		int count = 0;
-+		int k=0, dispCount = 0;
-+		char displays[5][32];
-+		g2d_renderer = weston_load_module("g2d-renderer.so",
-+											"g2d_renderer_interface");
-+		if (!g2d_renderer) {
-+			weston_log("could not load g2d renderer\n");
-+			goto out_launcher;
-+		}
-+
-+		if (g2d_renderer->create(backend->compositor) < 0) {
-+			weston_log("g2d_renderer_create failed.\n");
-+			goto out_launcher;
-+		}
-+
-+		weston_log("param->device=%s\n",param->device);
-+		count = strlen(param->device);
-+
-+		for(i= 0; i < count; i++) {
-+			if(param->device[i] == ',') {
-+				displays[dispCount][k] = '\0';
-+				dispCount++;
-+				k = 0;
-+				continue;
-+			}
-+			displays[dispCount][k++] = param->device[i];
-+		}
-+		displays[dispCount][k] = '\0';
-+		dispCount++;
-+
-+		for(i= 0; i < dispCount; i++){
-+			if (fbdev_output_create(backend, x, y, displays[i]) < 0)
-+				goto out_launcher;
-+			x += container_of(backend->compositor->output_list.prev,
-+							struct weston_output,
-+							link)->width;
-+		}
- 	} else {
- 		gl_renderer = weston_load_module("gl-renderer.so",
- 						 "gl_renderer_interface");
-@@ -811,7 +865,8 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
- 			goto out_launcher;
- 		}
- 	}
--	if (fbdev_output_create(backend, 0, 0, param->device) < 0)
-+	if(!backend->use_g2d)
-+		if (fbdev_output_create(backend, 0, 0, param->device) < 0)
- 			goto out_launcher;
- 
- 	udev_input_init(&backend->input, compositor, backend->udev, seat_id);
-@@ -840,6 +895,7 @@ config_init_to_defaults(struct weston_fbdev_backend_config *config)
- 	config->tty = 0; /* default to current tty */
- 	config->device = "/dev/fb0"; /* default frame buffer */
- 	config->use_gl = 0;
-+	config->use_g2d = 0;
- 	config->output_transform = WL_OUTPUT_TRANSFORM_NORMAL;
- }
- 
-@@ -861,7 +917,11 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
- 	config_init_to_defaults(&config);
- 	memcpy(&config, config_base, config_base->struct_size);
- 
--	config.use_gl = 1;
-+	if(config.use_g2d) {
-+		config.use_gl = 0;
-+	} else {
-+		config.use_gl = 1;
-+	}
- 
- 	b = fbdev_backend_create(compositor, argc, argv, wc, &config);
- 	if (b == NULL)
-diff --git a/src/compositor-fbdev.h b/src/compositor-fbdev.h
-index bd60bdc..32a8598 100644
---- a/src/compositor-fbdev.h
-+++ b/src/compositor-fbdev.h
-@@ -40,6 +40,7 @@ struct weston_fbdev_backend_config {
- 	int tty;
- 	char *device;
- 	int use_gl;
-+	int use_g2d;
- 
- 	uint32_t output_transform;
- };
-diff --git a/src/g2d-renderer.c b/src/g2d-renderer.c
-new file mode 100644
-index 0000000..c30aa62
---- /dev/null
-+++ b/src/g2d-renderer.c
-@@ -0,0 +1,1317 @@
-+/*
-+ * Copyright (c) 2016 Freescale Semiconductor, Inc.
-+ * Copyright © 2012 Intel Corporation
-+ * Copyright © 2015 Collabora, Ltd.
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial
-+ * portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+
-+#define _GNU_SOURCE
-+
-+#include <stdlib.h>
-+#include <string.h>
-+#include <ctype.h>
-+#include <float.h>
-+#include <assert.h>
-+#include <pthread.h>
-+#include <linux/fb.h>
-+#include <sys/ioctl.h>
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <g2dExt.h>
-+#include <HAL/gc_hal_eglplatform.h>
-+
-+#include "compositor.h"
-+#include "g2d-renderer.h"
-+#include "vertex-clipping.h"
-+#include "shared/helpers.h"
-+
-+#define BUFFER_DAMAGE_COUNT 2
-+#define ALIGN_WIDTH(a) (((a) + 15) & ~15)
-+
-+struct wl_viv_buffer
-+{
-+    struct wl_resource *resource;
-+    gcoSURF  surface;
-+    gctINT32 width;
-+    gctINT32 height;
-+    gctINT32 format;
-+    gctUINT alignedWidth;
-+    gctUINT alignedHeight;
-+    gctUINT32 physical[3];
-+    gctUINT32 gpuBaseAddr;
-+    gceTILING tiling;
-+};
-+
-+typedef struct _g2dRECT
-+{
-+	int left;
-+	int top;
-+	int right;
-+	int bottom;
-+} g2dRECT;
-+
-+struct fb_screeninfo {
-+	struct fb_var_screeninfo varinfo;
-+	struct fb_fix_screeninfo fixinfo;
-+	unsigned int x_resolution;
-+	unsigned int y_resolution;
-+	size_t buffer_length; /* length of frame buffer memory in bytes */
-+	size_t physical;
-+	size_t stride;
-+	size_t stride_bytes;
-+	enum g2d_format pixel_format; /* frame buffer pixel format */
-+	int fb_fd;
-+};
-+
-+struct g2d_output_state {
-+	int current_buffer;
-+	pixman_region32_t buffer_damage[BUFFER_DAMAGE_COUNT];
-+	struct g2d_surfaceEx *renderSurf;
-+	int nNumBuffers;
-+	int activebuffer;
-+	struct g2d_surfaceEx offscreenSurface;
-+	struct g2d_buf *offscreen_buf;
-+	struct fb_screeninfo fb_info;
-+	struct fb_screeninfo *mirror_fb_info;
-+	struct g2d_surfaceEx *mirrorSurf;
-+	int directBlit;
-+	int clone_display_num;
-+	int width;
-+	int height;
-+};
-+
-+struct g2d_surface_state {
-+	float color[4];
-+	struct weston_buffer_reference buffer_ref;
-+	int pitch; /* in pixels */
-+	int attached;
-+	pixman_region32_t texture_damage;
-+	struct g2d_surfaceEx g2d_surface;
-+	struct g2d_buf *shm_buf;
-+	int shm_buf_length;
-+	int bpp;
-+
-+	struct weston_surface *surface;
-+	struct wl_listener surface_destroy_listener;
-+	struct wl_listener renderer_destroy_listener;
-+};
-+
-+struct g2d_renderer {
-+	struct weston_renderer base;
-+	struct wl_signal destroy_signal;
-+#ifdef ENABLE_EGL
-+	NativeDisplayType display;
-+	EGLDisplay egl_display;
-+	struct wl_display *wl_display;
-+#endif
-+	void *handle;
-+};
-+
-+static int
-+g2d_renderer_create_surface(struct weston_surface *surface);
-+
-+static inline struct g2d_surface_state *
-+get_surface_state(struct weston_surface *surface)
-+{
-+	if (!surface->renderer_state)
-+		g2d_renderer_create_surface(surface);
-+	return (struct g2d_surface_state *)surface->renderer_state;
-+}
-+
-+static inline struct g2d_renderer *
-+get_renderer(struct weston_compositor *ec)
-+{
-+	return (struct g2d_renderer *)ec->renderer;
-+}
-+
-+#define max(a, b) (((a) > (b)) ? (a) : (b))
-+#define min(a, b) (((a) > (b)) ? (b) : (a))
-+/*
-+ * Compute the boundary vertices of the intersection of the global coordinate
-+ * aligned rectangle 'rect', and an arbitrary quadrilateral produced from
-+ * 'surf_rect' when transformed from surface coordinates into global coordinates.
-+ * The vertices are written to 'ex' and 'ey', and the return value is the
-+ * number of vertices. Vertices are produced in clockwise winding order.
-+ * Guarantees to produce either zero vertices, or 3-8 vertices with non-zero
-+ * polygon area.
-+ */
-+static int
-+calculate_edges(struct weston_view *ev, pixman_box32_t *rect,
-+		pixman_box32_t *surf_rect, float *ex, float *ey)
-+{
-+
-+	struct clip_context ctx;
-+	int i, n;
-+	float min_x, max_x, min_y, max_y;
-+	struct polygon8 surf = {
-+		{ surf_rect->x1, surf_rect->x2, surf_rect->x2, surf_rect->x1 },
-+		{ surf_rect->y1, surf_rect->y1, surf_rect->y2, surf_rect->y2 },
-+		4
-+	};
-+
-+	ctx.clip.x1 = rect->x1;
-+	ctx.clip.y1 = rect->y1;
-+	ctx.clip.x2 = rect->x2;
-+	ctx.clip.y2 = rect->y2;
-+
-+	/* transform surface to screen space: */
-+	for (i = 0; i < surf.n; i++)
-+		weston_view_to_global_float(ev, surf.x[i], surf.y[i],
-+					    &surf.x[i], &surf.y[i]);
-+
-+	/* find bounding box: */
-+	min_x = max_x = surf.x[0];
-+	min_y = max_y = surf.y[0];
-+
-+	for (i = 1; i < surf.n; i++) {
-+		min_x = min(min_x, surf.x[i]);
-+		max_x = max(max_x, surf.x[i]);
-+		min_y = min(min_y, surf.y[i]);
-+		max_y = max(max_y, surf.y[i]);
-+	}
-+
-+	/* First, simple bounding box check to discard early transformed
-+	 * surface rects that do not intersect with the clip region:
-+	 */
-+	if ((min_x >= ctx.clip.x2) || (max_x <= ctx.clip.x1) ||
-+	    (min_y >= ctx.clip.y2) || (max_y <= ctx.clip.y1))
-+		return 0;
-+
-+	/* Simple case, bounding box edges are parallel to surface edges,
-+	 * there will be only four edges.  We just need to clip the surface
-+	 * vertices to the clip rect bounds:
-+	 */
-+	if (!ev->transform.enabled)
-+		return clip_simple(&ctx, &surf, ex, ey);
-+
-+	/* Transformed case: use a general polygon clipping algorithm to
-+	 * clip the surface rectangle with each side of 'rect'.
-+	 * The algorithm is Sutherland-Hodgman, as explained in
-+	 * http://www.codeguru.com/cpp/misc/misc/graphics/article.php/c8965/Polygon-Clipping.htm
-+	 * but without looking at any of that code.
-+	 */
-+	n = clip_transformed(&ctx, &surf, ex, ey);
-+
-+	if (n < 3)
-+		return 0;
-+
-+	return n;
-+}
-+
-+
-+static inline struct g2d_output_state *
-+get_output_state(struct weston_output *output)
-+{
-+	return (struct g2d_output_state *)output->renderer_state;
-+}
-+
-+static void
-+g2d_getG2dTiling(IN gceTILING tiling, enum g2d_tiling* g2dTiling)
-+{
-+	switch(tiling)
-+	{
-+	case gcvLINEAR:
-+		*g2dTiling = G2D_LINEAR;
-+		break;
-+	case gcvTILED:
-+		*g2dTiling = G2D_TILED;
-+		break;
-+	case gcvSUPERTILED:
-+		*g2dTiling = G2D_SUPERTILED;
-+		break;
-+	default:
-+		weston_log("Error in function %s\n", __func__);
-+		break;
-+	}
-+}
-+
-+static void
-+g2d_getG2dFormat(IN gceSURF_FORMAT Format, enum g2d_format* g2dFormat)
-+{
-+	switch(Format)
-+	{
-+	case gcvSURF_R5G6B5:
-+		*g2dFormat = G2D_RGB565;
-+		break;
-+	case gcvSURF_A8B8G8R8:
-+		*g2dFormat = G2D_RGBA8888;
-+		break;
-+	case gcvSURF_X8B8G8R8:
-+		*g2dFormat = G2D_RGBA8888;
-+		break;
-+	case gcvSURF_A8R8G8B8:
-+		*g2dFormat = G2D_BGRA8888;
-+		break;
-+	case gcvSURF_X8R8G8B8:
-+		*g2dFormat = G2D_BGRX8888;
-+		break;
-+	case gcvSURF_B5G6R5:
-+		*g2dFormat = G2D_BGR565;
-+		break;
-+	case gcvSURF_B8G8R8A8:
-+		*g2dFormat = G2D_ARGB8888;
-+		break;
-+	case gcvSURF_R8G8B8A8:
-+		*g2dFormat = G2D_ABGR8888;
-+		break;
-+	case gcvSURF_B8G8R8X8:
-+		*g2dFormat = G2D_XRGB8888;
-+		break;
-+	case gcvSURF_R8G8B8X8:
-+		*g2dFormat = G2D_XBGR8888;
-+		break;
-+	case gcvSURF_NV12:
-+		*g2dFormat = G2D_NV12;
-+		break;
-+	case gcvSURF_NV21:
-+		*g2dFormat = G2D_NV21;
-+		break;
-+	case gcvSURF_I420:
-+		*g2dFormat = G2D_I420;
-+		break;
-+	case gcvSURF_YV12:
-+		*g2dFormat = G2D_YV12;
-+		break;
-+	case gcvSURF_YUY2:
-+		*g2dFormat = G2D_YUYV;
-+		break;
-+	case gcvSURF_YVYU:
-+		*g2dFormat = G2D_YVYU;
-+		break;
-+	case gcvSURF_UYVY:
-+		*g2dFormat = G2D_UYVY;
-+		break;
-+	case gcvSURF_VYUY:
-+		*g2dFormat = G2D_VYUY;
-+		break;
-+	case gcvSURF_NV16:
-+		*g2dFormat = G2D_NV16;
-+		break;
-+	case gcvSURF_NV61:
-+		*g2dFormat = G2D_NV61;
-+		break;
-+	default:
-+		weston_log("Error in function %s, Format not supported\n", __func__);
-+		break;
-+	}
-+}
-+
-+static void printG2dSurfaceInfo(struct g2d_surfaceEx* g2dSurface, const char* msg)
-+{
-+	weston_log("%s physicAddr = %x left = %d right = %d top=%d bottom=%d stride= %d tiling = %d, format=%d \n",
-+				msg,
-+				g2dSurface->base.planes[0],
-+				g2dSurface->base.left,
-+				g2dSurface->base.right,
-+				g2dSurface->base.top,
-+				g2dSurface->base.bottom,
-+				g2dSurface->base.stride,
-+				g2dSurface->tiling,
-+				g2dSurface->base.format);
-+}
-+
-+static void
-+get_g2dSurface(struct wl_viv_buffer *buffer, struct g2d_surfaceEx *g2dSurface)
-+{
-+	if(buffer->width < 0 || buffer->height < 0)
-+	{
-+		weston_log("invalid EGL buffer in function %s\n", __func__);
-+		return;
-+	}
-+	g2d_getG2dFormat(buffer->format, &g2dSurface->base.format);
-+	g2d_getG2dTiling(buffer->tiling, &g2dSurface->tiling);
-+	g2dSurface->base.planes[0] = buffer->physical[0] + buffer->gpuBaseAddr;
-+	g2dSurface->base.planes[1] = buffer->physical[1] + buffer->gpuBaseAddr;
-+	g2dSurface->base.planes[2] = buffer->physical[2] + buffer->gpuBaseAddr;
-+	g2dSurface->base.left = 0;
-+	g2dSurface->base.top = 0;
-+	g2dSurface->base.right = buffer->width;
-+	g2dSurface->base.bottom = buffer->height;
-+	g2dSurface->base.stride = buffer->alignedWidth;
-+	g2dSurface->base.width  = buffer->width;
-+	g2dSurface->base.height = buffer->height;
-+	g2dSurface->base.rot    = G2D_ROTATION_0;
-+}
-+
-+static void
-+g2d_SetSurfaceRect(struct g2d_surfaceEx* g2dSurface, g2dRECT* rect)
-+{
-+	if(g2dSurface && rect)
-+	{
-+		g2dSurface->base.left   = rect->left;
-+		g2dSurface->base.top    = rect->top;
-+		g2dSurface->base.right  = rect->right;
-+		g2dSurface->base.bottom = rect->bottom;
-+	}
-+}
-+
-+static int
-+g2d_blitSurface(void *handle, struct g2d_surfaceEx * srcG2dSurface, struct g2d_surfaceEx *dstG2dSurface, 
-+	g2dRECT *srcRect, g2dRECT *dstRect)
-+{
-+	g2d_SetSurfaceRect(srcG2dSurface, srcRect);
-+	g2d_SetSurfaceRect(dstG2dSurface, dstRect);
-+	srcG2dSurface->base.blendfunc = G2D_ONE;
-+	dstG2dSurface->base.blendfunc = G2D_ONE_MINUS_SRC_ALPHA;
-+
-+	if(g2d_blitEx(handle, srcG2dSurface, dstG2dSurface))
-+	{
-+		printG2dSurfaceInfo(srcG2dSurface, "SRC:");
-+		printG2dSurfaceInfo(dstG2dSurface, "DST:");
-+		return -1;
-+	}
-+	return 0;
-+}
-+
-+static void
-+g2d_flip_surface(struct weston_output *output)
-+{
-+	struct g2d_output_state *go = get_output_state(output);
-+	go->fb_info.varinfo.yoffset  = go->activebuffer * go->fb_info.y_resolution;
-+
-+	if(ioctl(go->fb_info.fb_fd, FBIOPAN_DISPLAY, &(go->fb_info.varinfo)) < 0)
-+	{
-+		weston_log("FBIOPAN_DISPLAY Failed\n");
-+	}
-+	go->activebuffer = (go->activebuffer + 1)  % go->nNumBuffers;
-+}
-+
-+static void
-+copy_to_framebuffer(struct weston_output *output)
-+{
-+	struct g2d_renderer *gr = get_renderer(output->compositor);
-+	struct g2d_output_state *go = get_output_state(output);
-+	if(!go->directBlit && go->nNumBuffers == 1)
-+	{
-+		g2dRECT srcRect  = {0, 0, go->offscreenSurface.base.width, go->offscreenSurface.base.height};
-+		g2dRECT dstrect  = srcRect;
-+		g2dRECT clipRect = srcRect;
-+		g2d_set_clipping(gr->handle, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
-+		g2d_blitSurface(gr->handle, &go->offscreenSurface,
-+			&go->renderSurf[go->activebuffer], &srcRect, &dstrect);
-+	}
-+
-+	if(go->clone_display_num)
-+	{
-+		int i = 0;
-+		for(i = 0; i < go->clone_display_num; i++)
-+		{
-+			g2dRECT srcRect  = {0, 0, go->renderSurf[go->activebuffer].base.width, go->renderSurf[go->activebuffer].base.height};
-+			g2dRECT dstrect  = {0, 0, go->mirrorSurf[i].base.width, go->mirrorSurf[i].base.height};
-+			g2dRECT clipRect = srcRect;
-+			g2d_set_clipping(gr->handle, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
-+			if(go->directBlit || go->nNumBuffers > 1)
-+			{
-+				g2d_blitSurface(gr->handle, &go->renderSurf[go->activebuffer],
-+				&go->mirrorSurf[i], &srcRect, &dstrect);
-+			}
-+			else
-+			{
-+				g2d_blitSurface(gr->handle, &go->offscreenSurface,
-+					&go->mirrorSurf[i], &srcRect, &dstrect);
-+			}
-+		}
-+	}
-+
-+	g2d_finish(gr->handle);
-+
-+	if(go->nNumBuffers > 1)
-+	{
-+		g2d_flip_surface(output);
-+	}
-+}
-+
-+static int
-+is_view_visible(struct weston_view *view)
-+{
-+	/* Return false, if surface is guaranteed to be totally obscured. */
-+	int ret;
-+	pixman_region32_t unocc;
-+
-+	pixman_region32_init(&unocc);
-+	pixman_region32_subtract(&unocc, &view->transform.boundingbox,
-+				 &view->clip);
-+	ret = pixman_region32_not_empty(&unocc);
-+	pixman_region32_fini(&unocc);
-+
-+	return ret;
-+}
-+ 
-+static void
-+use_output(struct weston_output *output)
-+{
-+	struct weston_compositor *compositor = output->compositor;
-+	struct weston_view *view;
-+	struct g2d_output_state *go = get_output_state(output);
-+	int visibleViews=0;
-+	int fullscreenViews=0;
-+
-+	if(go->nNumBuffers == 1)
-+	{
-+		wl_list_for_each_reverse(view, &compositor->view_list, link)
-+			if (view->plane == &compositor->primary_plane && is_view_visible(view))
-+			{
-+				visibleViews++;
-+				if(view->surface->width == go->width && view->surface->height == go->height)
-+				{
-+					pixman_box32_t *bb_rects;
-+					int nbb=0;
-+					bb_rects = pixman_region32_rectangles(&view->transform.boundingbox, &nbb);
-+					if(nbb == 1)
-+						if(bb_rects[0].x1 == 0 && bb_rects[0].y1 ==0)
-+							fullscreenViews++;
-+				}
-+			}
-+
-+		go->directBlit = ((visibleViews == 1) || (fullscreenViews > 1));
-+	}
-+}
-+
-+static int
-+g2d_renderer_read_pixels(struct weston_output *output,
-+			       pixman_format_code_t format, void *pixels,
-+			       uint32_t x, uint32_t y,
-+			       uint32_t width, uint32_t height)
-+{
-+	return 0;
-+}
-+
-+static int g2d_int_from_double(double d)
-+{
-+	return wl_fixed_to_int(wl_fixed_from_double(d));
-+}
-+
-+static void
-+repaint_region(struct weston_view *ev, struct weston_output *output, struct g2d_output_state *go, pixman_region32_t *region,
-+		pixman_region32_t *surf_region){
-+
-+	struct g2d_renderer *gr = get_renderer(ev->surface->compositor);
-+	struct g2d_surface_state *gs = get_surface_state(ev->surface);
-+
-+	pixman_box32_t *rects, *surf_rects, *bb_rects;
-+	int i, j, nrects, nsurf, nbb=0;
-+	g2dRECT srcRect = {0};
-+	g2dRECT dstrect = {0};
-+	g2dRECT clipRect = {0};
-+	int dstWidth = 0;
-+	int dstHeight = 0;
-+	struct g2d_surfaceEx *dstsurface;
-+
-+	bb_rects = pixman_region32_rectangles(&ev->transform.boundingbox, &nbb);
-+
-+	if(!gs->attached || nbb <= 0)
-+	{
-+		return;
-+	}
-+
-+	rects = pixman_region32_rectangles(region, &nrects);
-+	surf_rects = pixman_region32_rectangles(surf_region, &nsurf);
-+	srcRect.left = ev->geometry.x < 0.0 ? g2d_int_from_double(fabsf(ev->geometry.x)) : 0;
-+	srcRect.top  = ev->geometry.y < 0.0 ? g2d_int_from_double(fabsf(ev->geometry.y)) : 0;
-+	srcRect.right  = ev->surface->width;
-+	srcRect.bottom = ev->surface->height;
-+	if(go->nNumBuffers > 1 || go->directBlit)
-+	{
-+		dstsurface = &go->renderSurf[go->activebuffer];
-+	}
-+	else
-+	{
-+		dstsurface = &go->offscreenSurface;
-+	}
-+	dstWidth  = dstsurface->base.width;
-+	dstHeight = dstsurface->base.height;
-+	for (i = 0; i < nrects; i++)
-+	{
-+		pixman_box32_t *rect = &rects[i];
-+		gctFLOAT min_x, max_x, min_y, max_y;
-+
-+		dstrect.left = (bb_rects[0].x1 < 0) ? rect->x1 : bb_rects[0].x1;
-+		dstrect.top = (bb_rects[0].y1 < 0) ? rect->y1 : bb_rects[0].y1;
-+		dstrect.right = bb_rects[0].x2;
-+		dstrect.bottom = bb_rects[0].y2;
-+		/*Multi display support*/
-+		if(output->x > 0)
-+		{
-+			dstrect.left = dstrect.left - output->x;
-+			dstrect.right = dstrect.right - output->x;
-+		}
-+		if(dstrect.left < 0)
-+		{
-+			srcRect.left -= dstrect.left;
-+			dstrect.left = 0;
-+			if(srcRect.left > ev->surface->width)
-+				break;
-+		}
-+		if(dstrect.right > dstWidth)
-+		{
-+			dstrect.right = dstWidth;
-+			srcRect.right = srcRect.left + dstrect.right - dstrect.left;
-+			if(srcRect.right > ev->surface->width)
-+				break;
-+		}
-+		if(dstrect.bottom > dstHeight)
-+		{
-+			dstrect.bottom = dstHeight;
-+			srcRect.bottom = srcRect.top + dstrect.bottom - dstrect.top;
-+			if(srcRect.bottom < 0)
-+				break;
-+		}
-+
-+		for (j = 0; j < nsurf; j++)
-+		{
-+			pixman_box32_t *surf_rect = &surf_rects[j];
-+			gctFLOAT ex[8], ey[8];          /* edge points in screen space */
-+			int n;
-+			int m=0;
-+			n = calculate_edges(ev, rect, surf_rect, ex, ey);
-+			if (n < 3)
-+				continue;
-+
-+			min_x = max_x = ex[0];
-+			min_y = max_y = ey[0];
-+			for (m = 1; m < n; m++)
-+			{
-+				min_x = min(min_x, ex[m]);
-+				max_x = max(max_x, ex[m]);
-+				min_y = min(min_y, ey[m]);
-+				max_y = max(max_y, ey[m]);
-+			}
-+
-+			clipRect.left = g2d_int_from_double(min_x);
-+			clipRect.top = g2d_int_from_double(min_y);
-+			clipRect.right = g2d_int_from_double(max_x);
-+			clipRect.bottom = g2d_int_from_double(max_y);
-+
-+			if(output->x > 0)
-+			{
-+				clipRect.left = clipRect.left - output->x;
-+				clipRect.right = clipRect.right - output->x;
-+			}
-+			g2d_set_clipping(gr->handle, clipRect.left, clipRect.top, clipRect.right, clipRect.bottom);
-+			g2d_blitSurface(gr->handle, &gs->g2d_surface, dstsurface, &srcRect, &dstrect);
-+		}
-+	}
-+}
-+
-+static void
-+draw_view(struct weston_view *ev, struct weston_output *output,
-+	     pixman_region32_t *damage) /* in global coordinates */
-+{
-+	struct weston_compositor *ec = ev->surface->compositor;	
-+	struct g2d_output_state *go = get_output_state(output);
-+	struct g2d_surface_state *gs = get_surface_state(ev->surface);
-+	/* repaint bounding region in global coordinates: */
-+	pixman_region32_t repaint;
-+	/* non-opaque region in surface coordinates: */
-+	pixman_region32_t surface_blend;
-+	pixman_region32_t *buffer_damage;
-+
-+	pixman_region32_init(&repaint);
-+	pixman_region32_intersect(&repaint,
-+				  &ev->transform.boundingbox, damage);
-+	pixman_region32_subtract(&repaint, &repaint, &ev->clip);
-+
-+	if (!pixman_region32_not_empty(&repaint))
-+		goto out;
-+
-+	buffer_damage = &go->buffer_damage[go->current_buffer];
-+	pixman_region32_subtract(buffer_damage, buffer_damage, &repaint);
-+
-+	/* blended region is whole surface minus opaque region: */
-+	pixman_region32_init_rect(&surface_blend, 0, 0,
-+				  ev->surface->width, ev->surface->height);
-+	pixman_region32_subtract(&surface_blend, &surface_blend, &ev->surface->opaque);
-+
-+	struct g2d_renderer *gr = get_renderer(ec);
-+	if (pixman_region32_not_empty(&ev->surface->opaque)) {
-+		repaint_region(ev, output, go, &repaint, &ev->surface->opaque);
-+	}
-+
-+	if (pixman_region32_not_empty(&surface_blend)) {
-+		g2d_enable(gr->handle,G2D_BLEND);
-+		if (ev->alpha < 1.0)
-+		{
-+			g2d_enable(gr->handle, G2D_GLOBAL_ALPHA);
-+			gs->g2d_surface.base.global_alpha = ev->alpha * 0xFF;
-+		}
-+		repaint_region(ev, output, go, &repaint, &surface_blend);
-+		g2d_disable(gr->handle, G2D_GLOBAL_ALPHA);
-+		g2d_disable(gr->handle, G2D_BLEND);
-+	}
-+	pixman_region32_fini(&surface_blend);
-+
-+out:
-+	pixman_region32_fini(&repaint);
-+}
-+
-+static void
-+repaint_views(struct weston_output *output, pixman_region32_t *damage)
-+{
-+	struct weston_compositor *compositor = output->compositor;
-+	struct weston_view *view;
-+
-+	wl_list_for_each_reverse(view, &compositor->view_list, link)
-+		if (view->plane == &compositor->primary_plane)
-+			draw_view(view, output, damage);
-+}
-+
-+static void
-+g2d_renderer_repaint_output(struct weston_output *output,
-+			     pixman_region32_t *output_damage)
-+{
-+	struct g2d_output_state *go = get_output_state(output);
-+	struct weston_compositor *compositor = output->compositor;
-+	struct g2d_renderer *gr = get_renderer(compositor);
-+	int i;
-+
-+	use_output(output);
-+	for (i = 0; i < 2; i++)
-+		pixman_region32_union(&go->buffer_damage[i],
-+				      &go->buffer_damage[i],
-+				      output_damage);
-+
-+	pixman_region32_union(output_damage, output_damage,
-+			      &go->buffer_damage[go->current_buffer]);
-+
-+	repaint_views(output, output_damage);
-+	g2d_finish(gr->handle);
-+
-+	pixman_region32_copy(&output->previous_damage, output_damage);
-+	wl_signal_emit(&output->frame_signal, output);
-+	copy_to_framebuffer(output);
-+	go->current_buffer ^= 1;
-+}
-+
-+static void
-+g2d_renderer_attach_egl(struct weston_surface *es, struct weston_buffer *buffer)
-+{
-+	struct wl_viv_buffer *vivBuffer = wl_resource_get_user_data(buffer->resource);
-+	struct g2d_surface_state *gs = get_surface_state(es);
-+	buffer->width = vivBuffer->width;
-+	buffer->height = vivBuffer->height;
-+	get_g2dSurface(vivBuffer, &gs->g2d_surface);
-+}
-+
-+static void
-+g2d_renderer_flush_damage(struct weston_surface *surface)
-+{
-+	struct g2d_surface_state *gs = get_surface_state(surface);
-+	struct weston_buffer *buffer = gs->buffer_ref.buffer;
-+    struct weston_view *view;
-+	int texture_used;
-+	pixman_region32_union(&gs->texture_damage,
-+			      &gs->texture_damage, &surface->damage);
-+
-+	if (!buffer)
-+		return;
-+
-+	texture_used = 0;
-+	wl_list_for_each(view, &surface->views, surface_link) {
-+		if (view->plane == &surface->compositor->primary_plane) {
-+			texture_used = 1;
-+			break;
-+		}
-+	}
-+	if (!texture_used)
-+		return;
-+
-+	if (!pixman_region32_not_empty(&gs->texture_damage))
-+		goto done;
-+
-+	if(wl_shm_buffer_get(buffer->resource))
-+	{
-+		uint8_t *src = wl_shm_buffer_get_data(buffer->shm_buffer);
-+		uint8_t *dst = gs->shm_buf->buf_vaddr;
-+		int bpp      = gs->bpp;
-+		wl_shm_buffer_begin_access(buffer->shm_buffer);
-+		if(gs->shm_buf)
-+		{
-+			int alignedWidth = ALIGN_WIDTH(buffer->width);
-+			if(alignedWidth == buffer->width)
-+			{
-+				int size = wl_shm_buffer_get_stride(buffer->shm_buffer)*buffer->height;
-+				memcpy(dst, src, size);
-+			}
-+			else
-+			{
-+				int i, j;
-+				for (i = 0; i < buffer->height; i++)
-+				{
-+					for (j = 0; j < buffer->width; j++)
-+					{
-+						int dstOff = i * alignedWidth + j;
-+						int srcOff = (i * buffer->width + j);
-+						memcpy(dst + dstOff * bpp, src + srcOff * bpp, bpp);
-+					}
-+				}
-+			}
-+		}
-+		else
-+		{
-+			weston_log("Error: This shm buffer was not attached\n");
-+		}
-+		wl_shm_buffer_end_access(buffer->shm_buffer);
-+	}
-+	else
-+	{
-+		g2d_renderer_attach_egl(surface, buffer);
-+	}
-+
-+done:
-+	pixman_region32_fini(&gs->texture_damage);
-+	pixman_region32_init(&gs->texture_damage);
-+
-+	weston_buffer_reference(&gs->buffer_ref, NULL);
-+}
-+
-+static void
-+g2d_renderer_attach_shm(struct weston_surface *es, struct weston_buffer *buffer,
-+			struct wl_shm_buffer *shm_buffer)
-+{
-+	struct g2d_surface_state *gs = get_surface_state(es);
-+	int buffer_length = 0;
-+	int alloc_new_buff = 1;
-+	int alignedWidth = 0;
-+	enum g2d_format g2dFormat = 0;
-+	buffer->shm_buffer = shm_buffer;
-+	buffer->width = wl_shm_buffer_get_width(shm_buffer);
-+	buffer->height = wl_shm_buffer_get_height(shm_buffer);
-+	alignedWidth = ALIGN_WIDTH(buffer->width);
-+
-+	switch (wl_shm_buffer_get_format(shm_buffer)) {
-+	case WL_SHM_FORMAT_XRGB8888:
-+		g2dFormat = G2D_BGRX8888;
-+		gs->bpp = 4;
-+		break;
-+	case WL_SHM_FORMAT_ARGB8888:
-+		g2dFormat = G2D_BGRA8888;
-+		gs->bpp = 4;
-+		break;
-+	case WL_SHM_FORMAT_RGB565:
-+		g2dFormat = G2D_RGB565;
-+		gs->bpp = 2;
-+		break;
-+	default:
-+		weston_log("warning: unknown shm buffer format: %08x\n",
-+			   wl_shm_buffer_get_format(shm_buffer));
-+		return;
-+	}
-+
-+	buffer_length = alignedWidth * buffer->height * gs->bpp;
-+
-+	/* Only allocate a new g2d buff if it is larger than existing one.*/
-+	gs->shm_buf_length = buffer_length;
-+	if(gs->shm_buf && gs->shm_buf->buf_size > buffer_length)
-+	{
-+		alloc_new_buff = 0;
-+	}
-+
-+	if(alloc_new_buff)
-+	{
-+		if(gs->shm_buf)
-+			g2d_free(gs->shm_buf);
-+		gs->shm_buf = g2d_alloc(buffer_length, 0);
-+		gs->g2d_surface.base.planes[0] = gs->shm_buf->buf_paddr;
-+	}
-+	gs->g2d_surface.base.left = 0;
-+	gs->g2d_surface.base.top  = 0;
-+	gs->g2d_surface.base.right  = buffer->width;
-+	gs->g2d_surface.base.bottom = buffer->height;
-+	gs->g2d_surface.base.stride = alignedWidth;
-+	gs->g2d_surface.base.width  = buffer->width;
-+	gs->g2d_surface.base.height = buffer->height;
-+	gs->g2d_surface.base.rot    = G2D_ROTATION_0;
-+	gs->g2d_surface.base.clrcolor = 0xFF400000;
-+	gs->g2d_surface.tiling = G2D_LINEAR;
-+	gs->g2d_surface.base.format = g2dFormat;
-+}
-+
-+static void
-+g2d_renderer_attach(struct weston_surface *es, struct weston_buffer *buffer)
-+{
-+	struct g2d_surface_state *gs = get_surface_state(es);
-+	struct wl_shm_buffer *shm_buffer;
-+	weston_buffer_reference(&gs->buffer_ref, buffer);
-+
-+	if(buffer==NULL)
-+		return;
-+
-+	shm_buffer = wl_shm_buffer_get(buffer->resource);
-+
-+	if(shm_buffer)
-+	{
-+		g2d_renderer_attach_shm(es, buffer, shm_buffer);
-+	}
-+	else
-+	{
-+		g2d_renderer_attach_egl(es, buffer);
-+	}
-+	gs->attached = 1;
-+}
-+
-+static void
-+surface_state_destroy(struct g2d_surface_state *gs, struct g2d_renderer *gr)
-+{
-+	wl_list_remove(&gs->surface_destroy_listener.link);
-+	wl_list_remove(&gs->renderer_destroy_listener.link);
-+	if(gs->surface)
-+		gs->surface->renderer_state = NULL;
-+	
-+	if(gs->shm_buf)
-+	{
-+		g2d_free(gs->shm_buf);
-+		gs->shm_buf = NULL;
-+	}
-+
-+	weston_buffer_reference(&gs->buffer_ref, NULL);
-+	free(gs);
-+}
-+
-+static void
-+surface_state_handle_surface_destroy(struct wl_listener *listener, void *data)
-+{
-+	struct g2d_surface_state *gs;
-+	struct g2d_renderer *gr;
-+
-+	gs = container_of(listener, struct g2d_surface_state,
-+			  surface_destroy_listener);
-+
-+	gr = get_renderer(gs->surface->compositor);
-+	surface_state_destroy(gs, gr);
-+}
-+
-+static void
-+surface_state_handle_renderer_destroy(struct wl_listener *listener, void *data)
-+{
-+	struct g2d_surface_state *gs;
-+	struct g2d_renderer *gr;
-+
-+	gr = data;
-+
-+	gs = container_of(listener, struct g2d_surface_state,
-+			  renderer_destroy_listener);
-+
-+	surface_state_destroy(gs, gr);
-+}
-+
-+
-+static int
-+g2d_renderer_create_surface(struct weston_surface *surface)
-+{
-+	struct g2d_surface_state *gs;
-+	struct g2d_renderer *gr = get_renderer(surface->compositor);
-+
-+	gs = zalloc(sizeof *gs);
-+	if (gs == NULL)
-+		return -1;
-+
-+	/* A buffer is never attached to solid color surfaces, yet
-+	 * they still go through texcoord computations. Do not divide
-+	 * by zero there.
-+	 */
-+	gs->pitch = 1;
-+
-+	gs->surface = surface;
-+
-+	pixman_region32_init(&gs->texture_damage);
-+	surface->renderer_state = gs;
-+
-+	gs->surface_destroy_listener.notify =
-+		surface_state_handle_surface_destroy;
-+	wl_signal_add(&surface->destroy_signal,
-+		      &gs->surface_destroy_listener);
-+
-+	gs->renderer_destroy_listener.notify =
-+		surface_state_handle_renderer_destroy;
-+	wl_signal_add(&gr->destroy_signal,
-+		      &gs->renderer_destroy_listener);
-+
-+	if (surface->buffer_ref.buffer) {
-+		g2d_renderer_attach(surface, surface->buffer_ref.buffer);
-+		g2d_renderer_flush_damage(surface);
-+	}
-+    
-+    return 0;
-+}
-+
-+static void
-+g2d_renderer_surface_set_color(struct weston_surface *surface,
-+		 float red, float green, float blue, float alpha)
-+{
-+	struct g2d_surface_state *gs = get_surface_state(surface);
-+
-+	gs->color[0] = red;
-+	gs->color[1] = green;
-+	gs->color[2] = blue;
-+	gs->color[3] = alpha;
-+}
-+
-+
-+static void
-+g2d_renderer_output_destroy(struct weston_output *output)
-+{
-+	struct g2d_output_state *go = get_output_state(output);
-+	int i;
-+
-+	for (i = 0; i < 2; i++)
-+	{
-+		pixman_region32_fini(&go->buffer_damage[i]);
-+	}
-+
-+	if(go->offscreen_buf)
-+	{
-+		g2d_free(go->offscreen_buf);
-+		go->offscreen_buf = NULL;
-+	}
-+
-+	if(go->fb_info.fb_fd)
-+	{
-+		close(go->fb_info.fb_fd);
-+		go->fb_info.fb_fd = 0;
-+	}
-+
-+	if(go->renderSurf)
-+	{
-+		free(go->renderSurf);
-+		go->renderSurf = NULL;
-+	}
-+	for (i = 0; i < go->clone_display_num; i++)
-+	{
-+		if(go->mirror_fb_info[i].fb_fd)
-+		{
-+			close(go->mirror_fb_info[i].fb_fd);
-+			go->mirror_fb_info[i].fb_fd = 0;
-+		}
-+	}
-+	if(go->mirrorSurf)
-+	{
-+		free(go->mirrorSurf);
-+		go->mirrorSurf = NULL;
-+	}
-+	if(go->mirror_fb_info)
-+	{
-+		free(go->mirror_fb_info);
-+		go->mirror_fb_info = NULL;
-+	}
-+
-+	free(go);
-+}
-+
-+static void
-+g2d_renderer_destroy(struct weston_compositor *ec)
-+{
-+	struct g2d_renderer *gr = get_renderer(ec);
-+
-+	wl_signal_emit(&gr->destroy_signal, gr);
-+	g2d_close(gr->handle);
-+#ifdef ENABLE_EGL
-+	eglUnbindWaylandDisplayWL(gr->egl_display);
-+	eglTerminate(gr->egl_display);
-+	fbDestroyDisplay(gr->display);
-+#endif
-+	free(ec->renderer);
-+	ec->renderer = NULL;
-+}
-+
-+static int
-+g2d_renderer_create(struct weston_compositor *ec)
-+{
-+	struct g2d_renderer *gr;
-+	gr = malloc(sizeof *gr);
-+	if (gr == NULL)
-+		return -1;
-+
-+	gr->base.read_pixels = g2d_renderer_read_pixels;
-+	gr->base.repaint_output = g2d_renderer_repaint_output;
-+	gr->base.flush_damage = g2d_renderer_flush_damage;
-+	gr->base.attach = g2d_renderer_attach;
-+		gr->base.surface_set_color = g2d_renderer_surface_set_color;
-+	gr->base.destroy = g2d_renderer_destroy;
-+
-+	if(g2d_open(&gr->handle))
-+	{
-+		weston_log("g2d_open fail.\n");
-+		return -1;
-+	}
-+	ec->renderer = &gr->base; 
-+		wl_signal_init(&gr->destroy_signal);
-+	return 0;
-+}
-+
-+static int
-+calculate_g2d_format(struct fb_var_screeninfo *varinfo, enum g2d_format *g2dFormat)
-+{
-+	/* Get the color format. */
-+	switch (varinfo->green.length)
-+	{
-+		case 6:
-+			*g2dFormat= G2D_RGB565;
-+			break;
-+
-+		case 8:
-+			if (varinfo->blue.offset == 0)
-+			{
-+				*g2dFormat = (varinfo->transp.length == 0) ? G2D_BGRX8888 : G2D_BGRA8888;
-+			}
-+			else
-+			{
-+				*g2dFormat = (varinfo->transp.length == 0) ? G2D_RGBX8888 : G2D_RGBA8888;
-+			}
-+			break;
-+
-+		default:
-+			*g2dFormat = -1;
-+			break;
-+	}
-+	return 0;
-+}
-+
-+static int
-+get_G2dSurface_from_screeninfo(struct fb_screeninfo *info, struct g2d_surfaceEx* g2dSurface)
-+{
-+	if(info && g2dSurface)
-+	{
-+		g2dSurface->base.planes[0] = info->physical;
-+		g2dSurface->base.left = 0;
-+		g2dSurface->base.top  = 0;
-+		g2dSurface->base.right  = info->x_resolution;
-+		g2dSurface->base.bottom = info->y_resolution;
-+		g2dSurface->base.stride = info->stride;
-+		g2dSurface->base.width  = info->x_resolution;
-+		g2dSurface->base.height = info->y_resolution;
-+		g2dSurface->base.format = info->pixel_format;
-+		g2dSurface->base.rot    = G2D_ROTATION_0;
-+		g2dSurface->base.clrcolor = 0xFF400000;
-+		g2dSurface->tiling = G2D_LINEAR;
-+		return 0;
-+	}
-+	return -1;
-+}
-+
-+static int
-+fb_query_screen_info(struct g2d_output_state *output, int fd,
-+                        struct fb_screeninfo *info)
-+{
-+	struct g2d_output_state *go = output;
-+	struct fb_var_screeninfo *varinfo = &info->varinfo;
-+	struct fb_fix_screeninfo *fixinfo = &info->fixinfo;
-+
-+	/* Probe the device for screen information. */
-+	if (ioctl(fd, FBIOGET_VSCREENINFO, varinfo) < 0) {
-+		return -1;
-+	}
-+
-+	if(go->nNumBuffers > 1){
-+		varinfo->yres_virtual = varinfo->yres * go->nNumBuffers;
-+		if (ioctl(fd, FBIOPUT_VSCREENINFO, varinfo) < 0)
-+			return -1;
-+	}
-+
-+	if (ioctl(fd, FBIOGET_FSCREENINFO, fixinfo) < 0 ||
-+		ioctl(fd, FBIOGET_VSCREENINFO, varinfo) < 0){
-+		return -1;
-+	}
-+	/* Store the pertinent data. */
-+	info->x_resolution = varinfo->xres;
-+	info->y_resolution = varinfo->yres;
-+	info->physical = fixinfo->smem_start;
-+	info->buffer_length = fixinfo->smem_len;
-+	info->stride = fixinfo->line_length / (varinfo->bits_per_pixel >> 3);
-+	info->stride_bytes = fixinfo->line_length;
-+	calculate_g2d_format(varinfo, &info->pixel_format);
-+
-+	if (info->pixel_format < 0) {
-+		weston_log("Frame buffer uses an unsupported format.\n");
-+		return -1;
-+	}
-+
-+	return 0;
-+}
-+
-+static int
-+fb_frame_buffer_open(struct g2d_output_state *output, const char *fb_dev,
-+                        struct fb_screeninfo *screen_info)
-+{
-+	/* Open the frame buffer device. */
-+	screen_info->fb_fd = open(fb_dev, O_RDWR | O_CLOEXEC);
-+	if (screen_info->fb_fd < 0) {
-+		weston_log("Failed to open frame buffer device%s \n", fb_dev);
-+		return -1;
-+	}
-+
-+	/* Grab the screen info. */
-+	if (fb_query_screen_info(output, screen_info->fb_fd, screen_info) < 0) {
-+		weston_log("Failed to get frame buffer info \n");
-+
-+		close(screen_info->fb_fd);
-+		return -1;
-+	}
-+
-+	return 0;
-+}
-+
-+static void
-+getBufferNumber(struct g2d_output_state *go)
-+{
-+	char *p = NULL;
-+	p = getenv("FB_MULTI_BUFFER");
-+	if (p == gcvNULL)
-+	{
-+		go->nNumBuffers = 1;
-+	}
-+	else
-+	{
-+		go->nNumBuffers = atoi(p);
-+		if (go->nNumBuffers < 2)
-+		{
-+			go->nNumBuffers  = 1;
-+		}
-+		else if(go->nNumBuffers >= 2)
-+		{
-+			go->nNumBuffers = 2;
-+			go->activebuffer = 1;
-+		}
-+	}
-+	weston_log("FB_MULTI_BUFFER = %d\n", go->nNumBuffers);
-+}
-+
-+static int
-+g2d_renderer_surface_create(struct g2d_output_state *go, struct g2d_renderer *gr, const char *device)
-+{
-+	int i = 0;
-+	int offset = 0;
-+	weston_log("Opend device=%s\n", device);
-+	if(fb_frame_buffer_open(go, device, &go->fb_info) < 0)
-+	{
-+		weston_log("Open frame buffer failed.\n");
-+		return -1;
-+	}
-+	go->renderSurf = zalloc(sizeof(struct g2d_surfaceEx) * go->nNumBuffers);
-+	offset = go->fb_info.stride_bytes * go->fb_info.y_resolution;
-+	for(i = 0; i < go->nNumBuffers; i++)
-+	{
-+		get_G2dSurface_from_screeninfo(&go->fb_info, &go->renderSurf[i]);
-+		go->renderSurf[i].base.planes[0] = go->fb_info.physical
-+											+ (offset * i);
-+		g2d_clear(gr->handle, &go->renderSurf[i].base);
-+	}
-+
-+	if(go->nNumBuffers == 1)
-+	{
-+		go->offscreenSurface = (go->renderSurf[go->activebuffer]);
-+		go->offscreen_buf = g2d_alloc(go->fb_info.buffer_length, 0);
-+		go->offscreenSurface.base.planes[0] = go->offscreen_buf->buf_paddr;
-+		g2d_clear(gr->handle, &go->offscreenSurface.base);
-+	}
-+	return 0;
-+}
-+
-+static int
-+g2d_renderer_output_create(struct weston_output *output, struct wl_display *wl_display, const char *device)
-+
-+ {
-+	struct g2d_renderer *gr = get_renderer(output->compositor);
-+	struct g2d_output_state *go;
-+	int i;
-+	int clone_display_num = 0;
-+	int count = 0;
-+	int k=0, dispCount = 0;
-+	char displays[5][32];
-+	weston_log("g2d_renderer_output_create device=%s\n", device);
-+	count = strlen(device);
-+
-+	if(count > 0)
-+	{
-+		for(i= 0; i < count; i++)
-+		{
-+			if(device[i] == ',')
-+			{
-+				displays[dispCount][k] = '\0';
-+				dispCount++;
-+				k = 0;
-+				continue;
-+			}
-+			else if(device[i] != ' ')
-+			{
-+				displays[dispCount][k++] = device[i];
-+			}
-+		}
-+		displays[dispCount][k] = '\0';
-+		clone_display_num = dispCount++;
-+		weston_log("clone_display_num = %d\n", clone_display_num);
-+	}
-+	else
-+	{
-+		weston_log("Invalid device name\n");
-+		return -1;
-+	}
-+
-+	go = zalloc(sizeof *go);
-+	if (go == NULL)
-+		return -1;
-+	go->clone_display_num  = clone_display_num;
-+	output->renderer_state = go;
-+#ifdef ENABLE_EGL
-+	gr->wl_display = wl_display;
-+	gr->display = fbGetDisplay(wl_display);
-+	gr->egl_display = eglGetDisplay(gr->display);
-+	eglBindWaylandDisplayWL(gr->egl_display, wl_display);
-+#endif
-+	getBufferNumber(go);
-+
-+	if(g2d_renderer_surface_create(go, gr, displays[0]) < 0)
-+	{
-+		weston_log("Create Render surface failed.\n");
-+		return -1;
-+	}
-+
-+	if(go->clone_display_num)
-+	{
-+		go->mirrorSurf = zalloc(sizeof(struct g2d_surfaceEx) * clone_display_num);
-+		go->mirror_fb_info = zalloc(sizeof(struct fb_screeninfo) * clone_display_num);
-+		if(go->mirrorSurf == NULL || go->mirror_fb_info == NULL)
-+			return -1;
-+
-+		for(i = 0; i < clone_display_num; i++)
-+		{
-+			if(fb_frame_buffer_open(go, displays[i + 1], &go->mirror_fb_info[i]) < 0)
-+			{
-+				weston_log("Open frame buffer failed.\n");
-+				return -1;
-+			}
-+			get_G2dSurface_from_screeninfo(&go->mirror_fb_info[i], &go->mirrorSurf[i]);
-+			go->mirrorSurf[i].base.planes[0] = go->mirror_fb_info[i].physical;
-+			g2d_clear(gr->handle, &go->mirrorSurf[i].base);
-+		}
-+	}
-+	g2d_finish(gr->handle);
-+	for (i = 0; i < BUFFER_DAMAGE_COUNT; i++)
-+		pixman_region32_init(&go->buffer_damage[i]);
-+    return 0;
-+ }
-+
-+ WL_EXPORT struct g2d_renderer_interface g2d_renderer_interface = {
-+	.create = g2d_renderer_create,
-+	.output_create = g2d_renderer_output_create,
-+	.output_destroy = g2d_renderer_output_destroy,
-+};
-diff --git a/src/g2d-renderer.h b/src/g2d-renderer.h
-new file mode 100644
-index 0000000..fc4ca49
---- /dev/null
-+++ b/src/g2d-renderer.h
-@@ -0,0 +1,47 @@
-+/*
-+ * Copyright (c) 2015 Freescale Semiconductor, Inc.
-+ * Copyright © 2013 Vasily Khoruzhick <anarsoul@gmail.com>
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining
-+ * a copy of this software and associated documentation files (the
-+ * "Software"), to deal in the Software without restriction, including
-+ * without limitation the rights to use, copy, modify, merge, publish,
-+ * distribute, sublicense, and/or sell copies of the Software, and to
-+ * permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice (including the
-+ * next paragraph) shall be included in all copies or substantial
-+ * portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-+ * NONINFRINGEMENT.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
-+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
-+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-+ * SOFTWARE.
-+ */
-+#ifndef __g2d_renderer_h_
-+#define __g2d_renderer_h_
-+
-+#include  "compositor.h"
-+
-+#ifdef ENABLE_EGL
-+#include <EGL/egl.h>
-+#include <EGL/eglext.h>
-+#endif
-+
-+struct g2d_renderer_interface {
-+
-+	int (*create)(struct weston_compositor *ec);
-+
-+	int (*output_create)(struct weston_output *output,
-+		         struct wl_display *wl_display,
-+		         const char *device);
-+
-+	void (*output_destroy)(struct weston_output *output);
-+};
-+
-+#endif
-diff --git a/src/main.c b/src/main.c
-index 3279ac6..5d0bdc4 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -285,7 +285,8 @@ usage(int error_code)
- 		"Options for fbdev-backend.so:\n\n"
- 		"  --tty=TTY\t\tThe tty to use\n"
- 		"  --device=DEVICE\tThe framebuffer device to use\n"
--		"  --use-gl\t\tUse the GL renderer\n\n");
-+		"  --use-gl=1\t\tUse the GL renderer\n"
-+		"  --use-g2d=1\t\tUse the g2d renderer\n\n");
- #endif
- 
- #if defined(BUILD_HEADLESS_COMPOSITOR)
-@@ -868,7 +869,8 @@ load_fbdev_backend(struct weston_compositor *c, char const * backend,
- 	const struct weston_option fbdev_options[] = {
- 		{ WESTON_OPTION_INTEGER, "tty", 0, &config.tty },
- 		{ WESTON_OPTION_STRING, "device", 0, &config.device },
--		{ WESTON_OPTION_BOOLEAN, "use-gl", 0, &config.use_gl },
-+		{ WESTON_OPTION_INTEGER, "use-gl", 0, &config.use_gl },
-+		{ WESTON_OPTION_INTEGER, "use-g2d", 0, &config.use_g2d },
- 	};
- 
- 	parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv);
--- 
-2.7.4
-
diff --git a/recipes-graphics/wayland/weston/0003-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch b/recipes-graphics/wayland/weston/0003-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch
deleted file mode 100644
index 328213c..0000000
--- a/recipes-graphics/wayland/weston/0003-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From d22509cd41f9d44d9e66522307e30ad4ae4bace0 Mon Sep 17 00:00:00 2001
-From: Meng Mingming <mingming.meng@nxp.com>
-Date: Mon, 16 Jan 2017 10:23:13 +0800
-Subject: [PATCH 3/5] MGS-1783: xwld: Add clone mode support for multi display
-
-Support more than two displays to show the same contents
-
-Upstream Status: Inappropriate [i.MX specific]
-
-Date: May 16, 2016
-Signed-off-by: Yong Gan <yong.gan@nxp.com>
----
- src/compositor-fbdev.c | 18 +++++++++++++++---
- src/compositor-fbdev.h |  1 +
- src/main.c             |  1 +
- 3 files changed, 17 insertions(+), 3 deletions(-)
-
-diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
-index cff9513..0a05e7d 100644
---- a/src/compositor-fbdev.c
-+++ b/src/compositor-fbdev.c
-@@ -61,6 +61,8 @@ struct fbdev_backend {
- 	struct udev_input input;
- 	int use_pixman;
- 	int use_g2d;
-+	int clone_mode;
-+	char *clone_device;
- 	uint32_t output_transform;
- 	struct wl_listener session_listener;
- 	NativeDisplayType display;
-@@ -521,6 +523,8 @@ fbdev_output_create(struct fbdev_backend *backend,
- 			goto out_hw_surface;
- 	} else if(backend->use_g2d) {
- 		const char *g2d_device = device;
-+		if (backend->clone_mode)
-+			g2d_device = backend->clone_device;
- 
- 		if (g2d_renderer->output_create(&output->base,
- 							backend->compositor->wl_display, g2d_device) < 0) {
-@@ -797,6 +801,8 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
- 	backend->prev_state = WESTON_COMPOSITOR_ACTIVE;
- 	backend->use_pixman = !(param->use_gl || param->use_g2d);
- 	backend->use_g2d = param->use_g2d;
-+	backend->clone_mode = param->clone_mode;
-+	backend->clone_device = param->device;
- 	backend->output_transform = param->output_transform;
- 
- 	weston_setup_vt_switch_bindings(compositor);
-@@ -837,12 +843,17 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
- 		displays[dispCount][k] = '\0';
- 		dispCount++;
- 
--		for(i= 0; i < dispCount; i++){
--			if (fbdev_output_create(backend, x, y, displays[i]) < 0)
-+		if(backend->clone_mode){
-+			if (fbdev_output_create(backend, x, y, displays[0]) < 0)
- 				goto out_launcher;
--			x += container_of(backend->compositor->output_list.prev,
-+		} else {
-+			for(i= 0; i < dispCount; i++){
-+				if (fbdev_output_create(backend, x, y, displays[i]) < 0)
-+					goto out_launcher;
-+				x += container_of(backend->compositor->output_list.prev,
- 							struct weston_output,
- 							link)->width;
-+			}
- 		}
- 	} else {
- 		gl_renderer = weston_load_module("gl-renderer.so",
-@@ -896,6 +907,7 @@ config_init_to_defaults(struct weston_fbdev_backend_config *config)
- 	config->device = "/dev/fb0"; /* default frame buffer */
- 	config->use_gl = 0;
- 	config->use_g2d = 0;
-+	config->clone_mode = 0;
- 	config->output_transform = WL_OUTPUT_TRANSFORM_NORMAL;
- }
- 
-diff --git a/src/compositor-fbdev.h b/src/compositor-fbdev.h
-index 32a8598..a28ef3b 100644
---- a/src/compositor-fbdev.h
-+++ b/src/compositor-fbdev.h
-@@ -41,6 +41,7 @@ struct weston_fbdev_backend_config {
- 	char *device;
- 	int use_gl;
- 	int use_g2d;
-+	int clone_mode;
- 
- 	uint32_t output_transform;
- };
-diff --git a/src/main.c b/src/main.c
-index 5d0bdc4..18fe5e0 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -871,6 +871,7 @@ load_fbdev_backend(struct weston_compositor *c, char const * backend,
- 		{ WESTON_OPTION_STRING, "device", 0, &config.device },
- 		{ WESTON_OPTION_INTEGER, "use-gl", 0, &config.use_gl },
- 		{ WESTON_OPTION_INTEGER, "use-g2d", 0, &config.use_g2d },
-+		{ WESTON_OPTION_BOOLEAN, "clone-mode", 0, &config.clone_mode },
- 	};
- 
- 	parse_options(fbdev_options, ARRAY_LENGTH(fbdev_options), argc, argv);
--- 
-2.7.4
-
diff --git a/recipes-graphics/wayland/weston/0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch b/recipes-graphics/wayland/weston/0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch
deleted file mode 100644
index 95a88e6..0000000
--- a/recipes-graphics/wayland/weston/0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 2e5260168b59c96688b10912cff3d95ec1fbb3d8 Mon Sep 17 00:00:00 2001
-From: Meng Mingming <mingming.meng@nxp.com>
-Date: Mon, 16 Jan 2017 10:25:29 +0800
-Subject: [PATCH 4/5] MGS-1668: xwld: System can not boot up to desktop
-
-System can not boot up to desktop if press touch panel continuously during booting up.
-The weston view was not initialed completely, so add a protection to the pointer.
-
-Upstream Status: Denied [Could not reproduce]
-
-Date: MAR 08, 2016
-Signed-off-by: Yong Gan <yong.gan@nxp.com>
----
- src/compositor.c | 14 ++++++++------
- 1 file changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/src/compositor.c b/src/compositor.c
-index b6ef7f3..9d9805d 100644
---- a/src/compositor.c
-+++ b/src/compositor.c
-@@ -1470,12 +1470,14 @@ weston_view_from_global_fixed(struct weston_view *view,
- {
- 	float vxf, vyf;
- 
--	weston_view_from_global_float(view,
--				      wl_fixed_to_double(x),
--				      wl_fixed_to_double(y),
--				      &vxf, &vyf);
--	*vx = wl_fixed_from_double(vxf);
--	*vy = wl_fixed_from_double(vyf);
-+	if(view != NULL) {
-+		weston_view_from_global_float(view,
-+						wl_fixed_to_double(x),
-+						wl_fixed_to_double(y),
-+						&vxf, &vyf);
-+		*vx = wl_fixed_from_double(vxf);
-+		*vy = wl_fixed_from_double(vyf);
-+	}
- }
- 
- WL_EXPORT void
--- 
-2.7.4
-
diff --git a/recipes-graphics/wayland/weston/0005-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch b/recipes-graphics/wayland/weston/0005-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch
deleted file mode 100644
index 73b298c..0000000
--- a/recipes-graphics/wayland/weston/0005-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch
+++ /dev/null
@@ -1,146 +0,0 @@
-From 3c11ac3c4b8416752c0e147ccde067070005597e Mon Sep 17 00:00:00 2001
-From: Meng Mingming <mingming.meng@nxp.com>
-Date: Mon, 16 Jan 2017 10:28:28 +0800
-Subject: [PATCH 5/5] MGS-1724: xwld: G2D compositor build failed in slevk
- board
-
-Add macro ENABLE_EGL to make sure the EGL was not built in slevk board.
-
-Upstream Status: Inappropriate [i.MX specific]
-
-Date: Jan 16, 2017
-Signed-off-by: Meng Mingming <mingming.meng@nxp.com>
----
- src/compositor-fbdev.c | 18 ++++++++++++------
- src/main.c             | 22 +++++++++++++++++++---
- 2 files changed, 31 insertions(+), 9 deletions(-)
-
-diff --git a/src/compositor-fbdev.c b/src/compositor-fbdev.c
-index 0a05e7d..22d349b 100644
---- a/src/compositor-fbdev.c
-+++ b/src/compositor-fbdev.c
-@@ -65,7 +65,9 @@ struct fbdev_backend {
- 	char *clone_device;
- 	uint32_t output_transform;
- 	struct wl_listener session_listener;
-+#ifdef ENABLE_EGL
- 	NativeDisplayType display;
-+#endif
- };
- 
- struct fbdev_screeninfo {
-@@ -99,8 +101,10 @@ struct fbdev_output {
- 	pixman_image_t *hw_surface;
- 	uint8_t depth;
- 
-+#ifdef ENABLE_EGL
- 	NativeDisplayType display;
- 	NativeWindowType  window;
-+#endif
- };
- 
- struct gl_renderer_interface *gl_renderer;
-@@ -452,10 +456,13 @@ fbdev_frame_buffer_destroy(struct fbdev_output *output)
- 		           strerror(errno));
- 
- 	output->fb = NULL;
-+
-+#ifdef ENABLE_EGL
- 	if(output->window)
- 		fbDestroyWindow(output->window);
- 	if(output->display)
- 		fbDestroyDisplay(output->display);
-+#endif
- }
- 
- static void fbdev_output_destroy(struct weston_output *base);
-@@ -532,6 +539,7 @@ fbdev_output_create(struct fbdev_backend *backend,
- 				goto out_hw_surface;
- 		}
- 	} else {
-+#ifdef ENABLE_EGL
- 		setenv("HYBRIS_EGLPLATFORM", "wayland", 1);
- 		output->window = fbCreateWindow(backend->display, -1, -1, 0, 0);
- 		if (output->window == NULL) {
-@@ -545,6 +553,7 @@ fbdev_output_create(struct fbdev_backend *backend,
- 			weston_log("gl_renderer_output_create failed.\n");
- 			goto out_hw_surface;
- 		}
-+#endif
- 	}
- 
- 	loop = wl_display_get_event_loop(backend->compositor->wl_display);
-@@ -856,6 +865,7 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
- 			}
- 		}
- 	} else {
-+#ifdef ENABLE_EGL
- 		gl_renderer = weston_load_module("gl-renderer.so",
- 						 "gl_renderer_interface");
- 		if (!gl_renderer) {
-@@ -875,7 +885,9 @@ fbdev_backend_create(struct weston_compositor *compositor, int *argc, char *argv
- 			weston_log("gl_renderer_create failed.\n");
- 			goto out_launcher;
- 		}
-+#endif
- 	}
-+
- 	if(!backend->use_g2d)
- 		if (fbdev_output_create(backend, 0, 0, param->device) < 0)
- 			goto out_launcher;
-@@ -929,12 +941,6 @@ backend_init(struct weston_compositor *compositor, int *argc, char *argv[],
- 	config_init_to_defaults(&config);
- 	memcpy(&config, config_base, config_base->struct_size);
- 
--	if(config.use_g2d) {
--		config.use_gl = 0;
--	} else {
--		config.use_gl = 1;
--	}
--
- 	b = fbdev_backend_create(compositor, argc, argv, wc, &config);
- 	if (b == NULL)
- 		return -1;
-diff --git a/src/main.c b/src/main.c
-index 18fe5e0..a0a5471 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -285,8 +285,14 @@ usage(int error_code)
- 		"Options for fbdev-backend.so:\n\n"
- 		"  --tty=TTY\t\tThe tty to use\n"
- 		"  --device=DEVICE\tThe framebuffer device to use\n"
--		"  --use-gl=1\t\tUse the GL renderer\n"
--		"  --use-g2d=1\t\tUse the g2d renderer\n\n");
-+#if defined(ENABLE_EGL)
-+		"  --use-gl=1\t\tUse the GL renderer (default is 1)\n"
-+		"  --use-g2d=1\t\tUse the G2D renderer (default is 0)\n"
-+#else
-+		"  --use-gl=1\t\tUse the GL renderer (default is 0)\n"
-+		"  --use-g2d=1\t\tUse the G2D renderer (default is 1)\n"
-+#endif
-+		"  --clone-mode\t\tClone display to multiple devices\n\n");
- #endif
- 
- #if defined(BUILD_HEADLESS_COMPOSITOR)
-@@ -861,7 +867,17 @@ static int
- load_fbdev_backend(struct weston_compositor *c, char const * backend,
- 		      int *argc, char **argv, struct weston_config *wc)
- {
--	struct weston_fbdev_backend_config config = {{ 0, }};
-+	struct weston_fbdev_backend_config config = {
-+		.base = {0},
-+#ifdef ENABLE_EGL
-+		.use_gl = 1,
-+		.use_g2d = 0,
-+#else
-+		.use_gl = 0,
-+		.use_g2d = 1,
-+#endif
-+		.clone_mode = 0,
-+	};
- 	struct weston_config_section *section;
- 	char *s = NULL;
- 	int ret = 0;
--- 
-2.7.4
-
diff --git a/recipes-graphics/wayland/weston/0006-Link-compositor-to-egl.patch b/recipes-graphics/wayland/weston/0006-Link-compositor-to-egl.patch
deleted file mode 100644
index 3cad74f..0000000
--- a/recipes-graphics/wayland/weston/0006-Link-compositor-to-egl.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: weston-1.11.1/configure.ac
-===================================================================
---- weston-1.11.1.orig/configure.ac	2016-11-08 17:26:14.266564760 -0600
-+++ weston-1.11.1/configure.ac	2016-11-09 19:38:58.000000000 -0600
-@@ -93,6 +93,7 @@
- 	PKG_CHECK_MODULES(EGL, [egl glesv2])
-         PKG_CHECK_MODULES([EGL_TESTS], [egl glesv2 wayland-client wayland-egl])
- 	PKG_CHECK_MODULES([GL_RENDERER], [libdrm])
-+	COMPOSITOR_MODULES="$COMPOSITOR_MODULES egl"
- fi
- 
- AC_ARG_ENABLE(xkbcommon,
diff --git a/recipes-graphics/wayland/weston/0007-xwayland-Fix-crash-when-run-with-no-input-device.patch b/recipes-graphics/wayland/weston/0007-xwayland-Fix-crash-when-run-with-no-input-device.patch
deleted file mode 100644
index e3b1fa8..0000000
--- a/recipes-graphics/wayland/weston/0007-xwayland-Fix-crash-when-run-with-no-input-device.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 60f8817f371123b9c36b3ff1120eec1e8f9e3d10 Mon Sep 17 00:00:00 2001
-From: Tom Hochstein <tom.hochstein@nxp.com>
-Date: Mon, 31 Oct 2016 19:21:58 -0500
-Subject: [PATCH weston] xwayland: Fix crash when run with no input device
-
-Starting an xterm with no input device led to a crash
-because weston_wm_pick_seat() was returning garbage and
-weston_wm_selection_init() was trying to use the garbage.
-
-Upstream-Status: Accepted [https://cgit.freedesktop.org/wayland/weston/commit/?id=e7fff215ada3fd3d1b2af664888f960c082f9065]
-
-Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
----
- xwayland/selection.c      | 10 +++++++---
- xwayland/window-manager.c |  6 ++++--
- 2 files changed, 11 insertions(+), 5 deletions(-)
-
-Index: weston-1.11.0/xwayland/selection.c
-===================================================================
---- weston-1.11.0.orig/xwayland/selection.c	2016-05-19 16:36:04.000000000 -0500
-+++ weston-1.11.0/xwayland/selection.c	2016-11-01 14:32:48.000000000 -0500
-@@ -708,6 +708,8 @@
- 					  wm->atom.clipboard, mask);
- 
- 	seat = weston_wm_pick_seat(wm);
-+	if (seat == NULL)
-+		return;
- 	wm->selection_listener.notify = weston_wm_set_selection;
- 	wl_signal_add(&seat->selection_signal, &wm->selection_listener);
- 
-Index: weston-1.11.0/xwayland/window-manager.c
-===================================================================
---- weston-1.11.0.orig/xwayland/window-manager.c	2016-05-19 16:36:04.000000000 -0500
-+++ weston-1.11.0/xwayland/window-manager.c	2016-11-01 11:47:14.549606964 -0500
-@@ -1303,8 +1303,10 @@
- struct weston_seat *
- weston_wm_pick_seat(struct weston_wm *wm)
- {
--	return container_of(wm->server->compositor->seat_list.next,
--			    struct weston_seat, link);
-+	struct wl_list *seats = wm->server->compositor->seat_list.next;
-+	if (wl_list_empty(seats))
-+		return NULL;
-+	return container_of(seats, struct weston_seat, link);
- }
- 
- static struct weston_seat *
diff --git a/recipes-graphics/wayland/weston_1.11.1.bb b/recipes-graphics/wayland/weston_1.11.1.bb
deleted file mode 100644
index 22b30ad..0000000
--- a/recipes-graphics/wayland/weston_1.11.1.bb
+++ /dev/null
@@ -1,113 +0,0 @@
-SUMMARY = "Weston, a Wayland compositor"
-DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
-HOMEPAGE = "http://wayland.freedesktop.org"
-LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
-                    file://src/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38"
-
-SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
-           file://weston.png \
-           file://weston.desktop \
-           file://0001-make-error-portable.patch \
-           file://0001-configure.ac-Fix-wayland-protocols-path.patch \
-           file://0001-shared-include-stdint.h-for-int32_t.patch \
-           file://xwayland.weston-start \
-           file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
-           file://0001-Add-configuration-option-for-no-input-device.patch \
-"
-SRC_URI[md5sum] = "c5fdc02ab67d33c0fca8f72d341facdf"
-SRC_URI[sha256sum] = "548973496a5c8613d6690f9120f21066946a544df65ce4fe0ef153a8dc0bf6de"
-
-inherit autotools pkgconfig useradd distro_features_check
-# depends on virtual/egl
-REQUIRED_DISTRO_FEATURES = "opengl"
-
-DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
-DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
-
-EXTRA_OECONF = "--enable-setuid-install \
-                --disable-rpi-compositor \
-                --disable-rdp-compositor \
-                WAYLAND_PROTOCOLS_SYSROOT_DIR=${RECIPE_SYSROOT} \
-                "
-EXTRA_OECONF_append_qemux86 = "\
-		WESTON_NATIVE_BACKEND=fbdev-backend.so \
-		"
-EXTRA_OECONF_append_qemux86-64 = "\
-		WESTON_NATIVE_BACKEND=fbdev-backend.so \
-		"
-PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
-                   ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
-                   clients launch"
-#
-# Compositor choices
-#
-# Weston on KMS
-PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
-# Weston on Wayland (nested Weston)
-PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
-# Weston on X11
-PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
-# Headless Weston
-PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
-# Weston on framebuffer
-PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
-# weston-launch
-PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
-# VA-API desktop recorder
-PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
-# Weston with EGL support
-PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
-# Weston with cairo glesv2 support
-PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
-# Weston with lcms support
-PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
-# Weston with webp support
-PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
-# Weston with unwinding support
-PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
-# Weston with systemd-login support
-PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
-# Weston with Xwayland support (requires X11 and Wayland)
-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
-# colord CMS support
-PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
-# Clients support
-PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
-# Weston with PAM support
-PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
-
-do_install_append() {
-	# Weston doesn't need the .la files to load modules, so wipe them
-	rm -f ${D}/${libdir}/weston/*.la
-
-	# If X11, ship a desktop file to launch it
-	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
-		install -d ${D}${datadir}/applications
-		install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
-
-		install -d ${D}${datadir}/icons/hicolor/48x48/apps
-		install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
-	fi
-
-	if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
-		install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
-	fi
-}
-
-PACKAGE_BEFORE_PN += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)}"
-PACKAGES += "${PN}-examples"
-
-FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
-FILES_${PN}-examples = "${bindir}/*"
-
-FILES_${PN}-xwayland = "${libdir}/${BPN}/xwayland.so"
-RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
-
-RDEPENDS_${PN} += "xkeyboard-config"
-RRECOMMENDS_${PN} = "liberation-fonts"
-RRECOMMENDS_${PN}-dev += "wayland-protocols"
-
-USERADD_PACKAGES = "${PN}"
-GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/recipes-graphics/wayland/weston_1.11.1.bbappend b/recipes-graphics/wayland/weston_1.11.1.bbappend
deleted file mode 100644
index ccbf393..0000000
--- a/recipes-graphics/wayland/weston_1.11.1.bbappend
+++ /dev/null
@@ -1,46 +0,0 @@
-FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
-
-SRC_URI_append_imxgpu3d = " \
-    file://0001-MGS-2352-ccc-Add-GPU-VIV-support-for-weston-1.11.patch     \
-    file://0002-MGS-2521-ccc-Enable-g2d-renderer-for-weston-1.11.patch     \
-    file://0003-MGS-1783-xwld-Add-clone-mode-support-for-multi-displ.patch \
-    file://0004-MGS-1668-xwld-System-can-not-boot-up-to-desktop.patch      \
-    file://0005-MGS-1724-xwld-G2D-compositor-build-failed-in-slevk-b.patch \
-    file://0006-Link-compositor-to-egl.patch                               \
-"
-
-SRC_URI_append = " \
-    file://0007-xwayland-Fix-crash-when-run-with-no-input-device.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_imxgpu2d = "egl"
-PACKAGECONFIG_IMX_TO_REMOVE_imxgpu3d = ""
-
-PACKAGECONFIG_append = " ${PACKAGECONFIG_IMX_TO_APPEND}"
-PACKAGECONFIG_remove = " ${PACKAGECONFIG_IMX_TO_REMOVE}"
-
-
-EXTRA_OECONF_IMX_COMMON = " \
-    --disable-libunwind \
-    --disable-xwayland-test \
-    WESTON_NATIVE_BACKEND=fbdev-backend.so \
-"
-EXTRA_OECONF_IMX          = ""
-EXTRA_OECONF_IMX_imxpxp   = "${EXTRA_OECONF_IMX_COMMON}"
-EXTRA_OECONF_IMX_imxgpu2d = "${EXTRA_OECONF_IMX_COMMON}"
-
-EXTRA_OECONF_append = " ${EXTRA_OECONF_IMX}"
-
-PACKAGE_ARCH = "${MACHINE_SOCARCH}"
diff --git a/recipes-graphics/wayland/weston_2.0.0.bb b/recipes-graphics/wayland/weston_2.0.0.bb
new file mode 100644
index 0000000..8160f55
--- /dev/null
+++ b/recipes-graphics/wayland/weston_2.0.0.bb
@@ -0,0 +1,113 @@
+SUMMARY = "Weston, a Wayland compositor"
+DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
+HOMEPAGE = "http://wayland.freedesktop.org"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
+                    file://libweston/compositor.c;endline=26;md5=e342df749174a8ee11065583157c7a38"
+
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+           file://weston.png \
+           file://weston.desktop \
+           file://0001-make-error-portable.patch \
+           file://0001-configure.ac-Fix-wayland-protocols-path.patch \
+           file://xwayland.weston-start \
+           file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
+"
+SRC_URI[md5sum] = "15f38945942bf2a91fe2687145fb4c7d"
+SRC_URI[sha256sum] = "b4e446ac27f118196f1609dab89bb3cb3e81652d981414ad860e733b355365d8"
+
+inherit autotools pkgconfig useradd distro_features_check
+# depends on virtual/egl
+REQUIRED_DISTRO_FEATURES = "opengl"
+
+DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
+DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
+
+EXTRA_OECONF = "--enable-setuid-install \
+                --disable-rdp-compositor \
+                "
+EXTRA_OECONF_append_qemux86 = "\
+		WESTON_NATIVE_BACKEND=fbdev-backend.so \
+		"
+EXTRA_OECONF_append_qemux86-64 = "\
+		WESTON_NATIVE_BACKEND=fbdev-backend.so \
+		"
+PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
+                   ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd x11', d)} \
+                   clients launch"
+#
+# Compositor choices
+#
+# Weston on KMS
+PACKAGECONFIG[kms] = "--enable-drm-compositor,--disable-drm-compositor,drm udev virtual/mesa mtdev"
+# Weston on Wayland (nested Weston)
+PACKAGECONFIG[wayland] = "--enable-wayland-compositor,--disable-wayland-compositor,virtual/mesa"
+# Weston on X11
+PACKAGECONFIG[x11] = "--enable-x11-compositor,--disable-x11-compositor,virtual/libx11 libxcb libxcb libxcursor cairo"
+# Headless Weston
+PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compositor"
+# Weston on framebuffer
+PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
+# weston-launch
+PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
+# VA-API desktop recorder
+PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
+# Weston with EGL support
+PACKAGECONFIG[egl] = "--enable-egl --enable-simple-egl-clients,--disable-egl --disable-simple-egl-clients,virtual/egl"
+# Weston with cairo glesv2 support
+PACKAGECONFIG[cairo-glesv2] = "--with-cairo-glesv2,--with-cairo=image,cairo"
+# Weston with lcms support
+PACKAGECONFIG[lcms] = "--enable-lcms,--disable-lcms,lcms"
+# Weston with webp support
+PACKAGECONFIG[webp] = "--with-webp,--without-webp,libwebp"
+# Weston with unwinding support
+PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
+# Weston with systemd-login support
+PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
+# Weston with Xwayland support (requires X11 and Wayland)
+PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
+# colord CMS support
+PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
+# Clients support
+PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
+# Weston with PAM support
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
+
+do_install_append() {
+	# Weston doesn't need the .la files to load modules, so wipe them
+	rm -f ${D}/${libdir}/libweston-2/*.la
+
+	# If X11, ship a desktop file to launch it
+	if [ "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" ]; then
+		install -d ${D}${datadir}/applications
+		install ${WORKDIR}/weston.desktop ${D}${datadir}/applications
+
+		install -d ${D}${datadir}/icons/hicolor/48x48/apps
+		install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
+		install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
+	fi
+}
+
+PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', '${PN}-xwayland', '', d)} \
+             libweston-2 ${PN}-examples"
+
+FILES_${PN} = "${bindir}/weston ${bindir}/weston-terminal ${bindir}/weston-info ${bindir}/weston-launch ${bindir}/wcap-decode ${libexecdir} ${libdir}/${BPN}/*.so ${datadir}"
+
+FILES_libweston-2 = "${libdir}/lib*${SOLIBS} ${libdir}/libweston-2/*.so"
+SUMMARY_libweston-2 = "Helper library for implementing 'wayland window managers'."
+
+FILES_${PN}-examples = "${bindir}/*"
+
+FILES_${PN}-xwayland = "${libdir}/libweston-2/xwayland.so"
+RDEPENDS_${PN}-xwayland += "xserver-xorg-xwayland"
+
+RDEPENDS_${PN} += "xkeyboard-config"
+RRECOMMENDS_${PN} = "liberation-fonts"
+RRECOMMENDS_${PN}-dev += "wayland-protocols"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM_${PN} = "--system weston-launch"
diff --git a/recipes-graphics/wayland/weston_2.0.0.bbappend b/recipes-graphics/wayland/weston_2.0.0.bbappend
new file mode 100644
index 0000000..b32c5e6
--- /dev/null
+++ b/recipes-graphics/wayland/weston_2.0.0.bbappend
@@ -0,0 +1,35 @@
+SUMMARY_append = " (with i.MX support)"
+
+DEPENDS_append_imxgpu2d = " virtual/libg2d"
+
+# Use i.MX fork of weston for customizations.
+SRC_URI_remove_imxgpu2d = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz"
+SRC_URI_prepend_imxgpu2d = "git://source.codeaurora.org/external/imx/weston-imx.git;protocol=https;branch=weston-imx-2.0 "
+SRCREV_imxgpu2d = "506dc2d69b7cf7b7e7d1ea94ce29c8203215a67e"
+S_imxgpu2d = "${WORKDIR}/git"
+
+# Define RECIPE_SYSROOT since it doesn't exist in morty
+# for this backported recipe
+RECIPE_SYSROOT = "${STAGING_DIR}/${MACHINE}"
+
+EXTRA_OECONF_IMX_COMMON = "WESTON_NATIVE_BACKEND=fbdev-backend.so"
+EXTRA_OECONF_IMX          = ""
+EXTRA_OECONF_IMX_imxpxp   = "${EXTRA_OECONF_IMX_COMMON}"
+EXTRA_OECONF_IMX_imxgpu2d = "${EXTRA_OECONF_IMX_COMMON}"
+EXTRA_OECONF_append = " ${EXTRA_OECONF_IMX}"
+
+# Disable OpenGL for parts with GPU support for 2D but not 3D
+IMX_REQUIRED_DISTRO_FEATURES_REMOVE          = ""
+IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu2d = "opengl"
+IMX_REQUIRED_DISTRO_FEATURES_REMOVE_imxgpu3d = ""
+REQUIRED_DISTRO_FEATURES_remove = "${IMX_REQUIRED_DISTRO_FEATURES_REMOVE}"
+IMX_EXTRA_OECONF_OPENGL          = ""
+IMX_EXTRA_OECONF_OPENGL_imxgpu2d = " --disable-opengl"
+IMX_EXTRA_OECONF_OPENGL_imxgpu3d = ""
+EXTRA_OECONF_append = "${IMX_EXTRA_OECONF_OPENGL}"
+
+PACKAGECONFIG_append_imxgpu3d = " cairo-glesv2"
+
+RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam-plugin-loginuid', '', d)}"
+
+PACKAGE_ARCH = "${MACHINE_SOCARCH}"
-- 
1.9.1



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

* [PATCH v3 8/8] weston-init: Fix weston 2.0 startup for pam, systemd case
  2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
                   ` (6 preceding siblings ...)
  2017-11-21 12:56 ` [PATCH v3 7/8] weston: Switch to 2.0 with i.MX fork Tom Hochstein
@ 2017-11-21 12:56 ` Tom Hochstein
  7 siblings, 0 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-11-21 12:56 UTC (permalink / raw)
  To: meta-freescale

The weston-start script for starting Weston does not work
well for Weston 2.0.

Daniel Diaz's proposal [1] for the systemd case with pam
seems to work, except that starting an xterm under XWayland
causes the desktop to crash. Using weston-launch instead of
weston works better.

[1] http://lists.openembedded.org/pipermail/openembedded-core/2016-December/129986.html

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
---
 recipes-graphics/wayland/weston-init.bbappend      | 23 ++++++++++++++
 recipes-graphics/wayland/weston-init/weston.config |  2 ++
 .../wayland/weston-init/weston.service             | 37 ++++++++++++++++++++++
 3 files changed, 62 insertions(+)
 create mode 100644 recipes-graphics/wayland/weston-init.bbappend
 create mode 100644 recipes-graphics/wayland/weston-init/weston.config
 create mode 100644 recipes-graphics/wayland/weston-init/weston.service

diff --git a/recipes-graphics/wayland/weston-init.bbappend b/recipes-graphics/wayland/weston-init.bbappend
new file mode 100644
index 0000000..8a5d9a8
--- /dev/null
+++ b/recipes-graphics/wayland/weston-init.bbappend
@@ -0,0 +1,23 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+REQUIRED_DISTRO_FEATURES_REMOVE_IMXGPU          = ""
+REQUIRED_DISTRO_FEATURES_REMOVE_IMXGPU_imxgpu2d = "opengl"
+REQUIRED_DISTRO_FEATURES_REMOVE_IMXGPU_imxgpu3d = ""
+REQUIRED_DISTRO_FEATURES_remove = "${REQUIRED_DISTRO_FEATURES_REMOVE_IMXGPU}"
+
+SRC_URI_append = \
+    "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', \
+        ' file://weston.config', '', d)}"
+
+HAS_XWAYLAND = "${@bb.utils.contains('DISTRO_FEATURES', 'wayland x11', 'true', 'false', d)}"
+
+do_install_append() {
+    sed -i \
+        -e 's,/usr/bin,${bindir},g' \
+        -e 's,/etc,${sysconfdir},g' \
+        -e 's,/var,${localstatedir},g' \
+        ${D}${systemd_system_unitdir}/weston.service
+    if ${HAS_XWAYLAND}; then
+        install -Dm0755 ${WORKDIR}/weston.config ${D}${sysconfdir}/default/weston
+    fi
+}
diff --git a/recipes-graphics/wayland/weston-init/weston.config b/recipes-graphics/wayland/weston-init/weston.config
new file mode 100644
index 0000000..7c92cf1
--- /dev/null
+++ b/recipes-graphics/wayland/weston-init/weston.config
@@ -0,0 +1,2 @@
+#!/bin/sh
+OPTARGS="--xwayland"
diff --git a/recipes-graphics/wayland/weston-init/weston.service b/recipes-graphics/wayland/weston-init/weston.service
new file mode 100644
index 0000000..e3938c9
--- /dev/null
+++ b/recipes-graphics/wayland/weston-init/weston.service
@@ -0,0 +1,37 @@
+[Unit]
+Description=Weston Wayland Compositor (on tty7)
+RequiresMountsFor=/run
+Conflicts=getty@tty7.service plymouth-quit.service
+After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service
+
+[Service]
+User=root
+PermissionsStartOnly=true
+
+# Log us in via PAM so we get our XDG & co. environment and
+# are treated as logged in so we can use the tty:
+PAMName=login
+
+# Grab tty7
+UtmpIdentifier=tty7
+TTYPath=/dev/tty7
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+
+# stderr to journal so our logging doesn't get thrown into /dev/null
+StandardOutput=tty
+StandardInput=tty
+StandardError=journal
+
+EnvironmentFile=-/etc/default/weston
+
+# Weston does not successfully change VT, nor does systemd place us on
+# the VT it just activated for us. Switch manually:
+ExecStartPre=/usr/bin/chvt 7
+ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS
+
+IgnoreSIGPIPE=no
+
+[Install]
+WantedBy=multi-user.target
-- 
1.9.1



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

* Re: [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0
  2017-11-21 12:56 ` [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0 Tom Hochstein
@ 2017-12-07  9:55   ` Stefan Agner
  2017-12-07 15:07     ` Gary Bisson
  0 siblings, 1 reply; 12+ messages in thread
From: Stefan Agner @ 2017-12-07  9:55 UTC (permalink / raw)
  To: Tom Hochstein; +Cc: meta-freescale

Hi Tom,

On 2017-11-21 13:56, Tom Hochstein wrote:
> Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
> ---
>  recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc      |  8 +++-----
>  .../xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb        | 10 ----------
>  .../xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb           |  9 +++++++++

I tried to give this patchset a shot, however it fails for me due to a
HTTP 404:
http://www.freescale.com/lgfiles/NMG/MAD/YOCTO//xserver-xorg-video-imx-viv-6.2.2.p0.tar.gz

Is this not officially released yet or is there anything else I miss?

--
Stefan


>  3 files changed, 12 insertions(+), 15 deletions(-)
>  delete mode 100644
> recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb
>  create mode 100644
> recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb
> 
> diff --git a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc
> b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc
> index a6d722b..c16da67 100644
> --- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc
> +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc
> @@ -8,7 +8,7 @@ PE = "3"
>  
>  inherit autotools-brokensep update-rc.d pkgconfig
>  
> -DEPENDS += "virtual/xserver virtual/libx11 virtual/libgal-x11
> imx-gpu-viv pixman"
> +DEPENDS += "virtual/xserver virtual/libx11 virtual/libgal-x11
> imx-gpu-viv virtual/libg2d pixman"
>  
>  LIC_FILES_CHKSUM = "file://COPYING-MIT;md5=b5e9d9f5c02ea831ab3ecf802bb7c4f3"
>  
> @@ -32,8 +32,6 @@ CFLAGS += "-I${STAGING_INCDIR}/xorg \
>             -I${STAGING_INCDIR}/drm \
>             -I../../DRI_1.10.4/src"
>  
> -S = "${WORKDIR}/xserver-xorg-video-imx-viv-${PV}/"
> -
>  PACKAGES =+ "xserver-xorg-extension-viv-autohdmi"
>  
>  # FIXME: The Freescale provided Makefile has hardcodec include paths
> @@ -55,7 +53,7 @@ do_install_append () {
>  	find ${D}${includedir} -type f -exec chmod 660 {} \;
>  }
>  
> -RDEPENDS_${PN} += "libvivante-dri-mx6 \
> +RDEPENDS_${PN} += "libvivante-dri-imx \
>                     xserver-xorg-module-exa \
>                     mesa-driver-swrast \
>                     xserver-xorg-extension-dri \
> @@ -72,4 +70,4 @@ FILES_${PN}-dbg = "${libdir}/*/*/*/.debug
> ${libdir}/.debug/libfsl_x11_ext${SOLIB
>  FILES_xserver-xorg-extension-viv-autohdmi = "
> ${libdir}/libfsl_x11_ext${SOLIBS} ${exec_prefix}/bin/autohdmi
> ${sysconfdir}/init.d/rc.autohdmi"
>  
>  PACKAGE_ARCH = "${MACHINE_SOCARCH}"
> -COMPATIBLE_MACHINE = "(mx6)"
> +COMPATIBLE_MACHINE = "(mx6|mx7ulp)"
> diff --git
> a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb
> b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb
> deleted file mode 100644
> index a15033e..0000000
> --- a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb
> +++ /dev/null
> @@ -1,10 +0,0 @@
> -# Copyright (C) 2012-2016 Freescale Semiconductor
> -# Copyright (C) 2012-2014 O.S. Systems Software LTDA.
> -# Released under the MIT license (see COPYING.MIT for the terms)
> -
> -require xf86-video-imxfb-vivante.inc
> -
> -SRC_URI += "file://Stop-using-Git-to-write-local-version.patch"
> -
> -SRCBRANCH = "nxp/imx_4.9.11_1.0.0_ga"
> -SRCREV = "07ef065dfe09f1c05a1a188c371577faa3677a17"
> diff --git
> a/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb
> b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb
> new file mode 100644
> index 0000000..5514962
> --- /dev/null
> +++ b/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb
> @@ -0,0 +1,9 @@
> +# Copyright (C) 2012-2016 Freescale Semiconductor
> +# Copyright (C) 2012-2014 O.S. Systems Software LTDA.
> +# Copyright 2017 NXP
> +# Released under the MIT license (see COPYING.MIT for the terms)
> +
> +require xf86-video-imxfb-vivante.inc
> +
> +SRCBRANCH = "nxp/imx_4.9.11_1.0.0_ga"
> +SRCREV = "07ef065dfe09f1c05a1a188c371577faa3677a17"
> -- 
> 1.9.1


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

* Re: [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0
  2017-12-07  9:55   ` Stefan Agner
@ 2017-12-07 15:07     ` Gary Bisson
  2017-12-07 17:14       ` Tom Hochstein
  0 siblings, 1 reply; 12+ messages in thread
From: Gary Bisson @ 2017-12-07 15:07 UTC (permalink / raw)
  To: Stefan Agner; +Cc: meta-freescale Mailing List

Hi Stefan,

On Thu, Dec 7, 2017 at 10:55 AM, Stefan Agner <stefan@agner.ch> wrote:
>
> Hi Tom,
>
> On 2017-11-21 13:56, Tom Hochstein wrote:
> > Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
> > ---
> >  recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc      |  8 +++-----
> >  .../xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb        | 10 ----------
> >  .../xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb           |  9 +++++++++
>
> I tried to give this patchset a shot, however it fails for me due to a
> HTTP 404:
> http://www.freescale.com/lgfiles/NMG/MAD/YOCTO//xserver-xorg-video-imx-viv-6.2.2.p0.tar.gz
>
> Is this not officially released yet or is there anything else I miss?

Maybe they removed the package since the project now has its own git repo:
https://source.codeaurora.org/external/imx/xf86-video-imx-vivante/

That is what they use in their Yocto recipe:
https://source.codeaurora.org/external/imx/meta-fsl-bsp-release/tree/imx/meta-bsp/recipes-graphics/xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb?h=nxp/imx-morty

Regards,
Gary


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

* Re: [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0
  2017-12-07 15:07     ` Gary Bisson
@ 2017-12-07 17:14       ` Tom Hochstein
  0 siblings, 0 replies; 12+ messages in thread
From: Tom Hochstein @ 2017-12-07 17:14 UTC (permalink / raw)
  To: Gary Bisson, Stefan Agner; +Cc: meta-freescale Mailing List



> -----Original Message-----
> From: Gary Bisson [mailto:gary.bisson@boundarydevices.com]
> Sent: Thursday, December 07, 2017 9:07 AM
> To: Stefan Agner <stefan@agner.ch>
> Cc: Tom Hochstein <tom.hochstein@nxp.com>; meta-freescale Mailing List <meta-freescale@yoctoproject.org>
> Subject: Re: [meta-freescale] [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0
> 
> Hi Stefan,
> 
> On Thu, Dec 7, 2017 at 10:55 AM, Stefan Agner <stefan@agner.ch> wrote:
> >
> > Hi Tom,
> >
> > On 2017-11-21 13:56, Tom Hochstein wrote:
> > > Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
> > > ---
> > >  recipes-graphics/xorg-driver/xf86-video-imxfb-vivante.inc      |  8 +++-----
> > >  .../xorg-driver/xf86-video-imxfb-vivante_5.0.11.p8.6.bb        | 10 ----------
> > >  .../xorg-driver/xf86-video-imxfb-vivante_6.2.2.p0.bb           |  9 +++++++++
> >
> > I tried to give this patchset a shot, however it fails for me due to a
> > HTTP 404:
> >
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.freescale.com%2Flgfiles%2FNMG%2FMAD%2FYOCTO%2F%2
> Fxserver-xorg-video-imx-viv-
> 6.2.2.p0.tar.gz&data=02%7C01%7Ctom.hochstein%40nxp.com%7C7bc118ebe9ff4242c68308d53d842f7f%7C686ea1d3bc2b4c6fa92cd99c5
> c301635%7C0%7C0%7C636482560305964786&sdata=nzzxkbJaf%2FRW%2F1wG2JSzptTKOVjBZP9XHJtZQHAArBY%3D&reserved=0
> >
> > Is this not officially released yet or is there anything else I miss?
> 
> Maybe they removed the package since the project now has its own git repo:
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fxf86-video-imx-
> vivante%2F&data=02%7C01%7Ctom.hochstein%40nxp.com%7C7bc118ebe9ff4242c68308d53d842f7f%7C686ea1d3bc2b4c6fa92cd99c5c30
> 1635%7C0%7C0%7C636482560305964786&sdata=mx4gNFJWHsb%2BcEFYwrp2qFsSL01SI9XLwhdVpDarX9Q%3D&reserved=0
> 
> That is what they use in their Yocto recipe:
> https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fmeta-fsl-bsp-
> release%2Ftree%2Fimx%2Fmeta-bsp%2Frecipes-graphics%2Fxorg-driver%2Fxf86-video-imxfb-vivante_6.2.2.p0.bb%3Fh%3Dnxp%2Fimx-
> morty&data=02%7C01%7Ctom.hochstein%40nxp.com%7C7bc118ebe9ff4242c68308d53d842f7f%7C686ea1d3bc2b4c6fa92cd99c5c301635
> %7C0%7C0%7C636482560305964786&sdata=ePgz%2BlNDuLJZL7g0u3ptzr1L1GPmY%2BmALACByZhqF4k%3D&reserved=0
> 
> Regards,
> Gary

Ah, found the problem, my patchset was based on an older version of the file that already contained the move to the git repo. I will rebase since that patch was reverted.

https://github.com/Freescale/meta-freescale/commit/61b93d11051ad5c1a45096bfa459fd480bf67f66

Tom

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

end of thread, other threads:[~2017-12-07 22:47 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-21 12:56 [PATCH v3 0/8] Graphics updates for L4.9.11-1.0.0 BSP Release plus Weston 2.0 Tom Hochstein
2017-11-21 12:56 ` [PATCH v3 1/8] imx-gpu-apitrace: Move apitrace out of imx-gpu-viv v6 Tom Hochstein
2017-11-21 12:56 ` [PATCH v3 2/8] imx-gpu-g2d: Move imx-gpu-g2d " Tom Hochstein
2017-11-21 12:56 ` [PATCH v3 3/8] imx-gpu-viv: Upgrade to 6.2.2.p0 Tom Hochstein
2017-11-21 12:56 ` [PATCH v3 4/8] mesa: Remove parts provided by imx-gpu-viv v6 Tom Hochstein
2017-11-21 12:56 ` [PATCH v3 5/8] xf86-video-imxfb-vivante: Upgrade to 6.2.2.p0 Tom Hochstein
2017-12-07  9:55   ` Stefan Agner
2017-12-07 15:07     ` Gary Bisson
2017-12-07 17:14       ` Tom Hochstein
2017-11-21 12:56 ` [PATCH v3 6/8] gtk+3: Use egl pkgconfig for build setup Tom Hochstein
2017-11-21 12:56 ` [PATCH v3 7/8] weston: Switch to 2.0 with i.MX fork Tom Hochstein
2017-11-21 12:56 ` [PATCH v3 8/8] weston-init: Fix weston 2.0 startup for pam, systemd case Tom Hochstein

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.