summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen2/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'meta-rcar-gen2/recipes-graphics')
-rw-r--r--meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb5
-rw-r--r--meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc2
-rw-r--r--meta-rcar-gen2/recipes-graphics/mesa/mesa-wayland.inc15
-rw-r--r--meta-rcar-gen2/recipes-graphics/mesa/mesa_10.6.3/0001-dri2-wayland-fixup-gcc5-build.patch28
-rw-r--r--meta-rcar-gen2/recipes-graphics/wayland/libegl.bb2
-rw-r--r--meta-rcar-gen2/recipes-graphics/wayland/libgbm.bb2
-rw-r--r--meta-rcar-gen2/recipes-graphics/wayland/weston/weston-workaround-to-avoid-segfault-on-hotplug-event.patch81
-rw-r--r--meta-rcar-gen2/recipes-graphics/wayland/weston_1.5.0.bbappend1
8 files changed, 130 insertions, 6 deletions
diff --git a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
index b67b26a..1845c98 100644
--- a/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
+++ b/meta-rcar-gen2/recipes-graphics/gles-module/gles-user-module.bb
@@ -6,7 +6,7 @@ LICENSE = "CLOSED"
PN = "gles-user-module"
PR = "r0"
-RDEPENDS_${PN} = "gles-kernel-module"
+RDEPENDS_${PN} = "gles-kernel-module libgbm"
COMPATIBLE_MACHINE = "(r8a7790|r8a7791|r8a7793|r8a7794)"
PACKAGE_ARCH = "${MACHINE_ARCH}"
@@ -54,6 +54,9 @@ do_install() {
cp -r ${S}/etc ${D}
cp -r ${S}/usr ${D}
+ # Create a symbolic link for compatibility with various software
+ ln -s ${D}/usr/lib/libGLESv2.so ${D}/usr/lib/libGLESv2.so.2
+
if [ "${USE_WAYLAND}" = "1" ]; then
# Rename libEGL.so
mv ${D}/usr/lib/libEGL.so ${D}/usr/lib/libEGL-pvr.so
diff --git a/meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc b/meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc
index 183d2a9..bea1510 100644
--- a/meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc
+++ b/meta-rcar-gen2/recipes-graphics/images/core-image-renesas-base.inc
@@ -2,7 +2,7 @@ require ../../include/multimedia-control.inc
require ../../include/gles-control.inc
# common
IMAGE_INSTALL_append_rcar-gen2 = " \
- alsa-utils alsa-tools \
+ alsa-utils alsa-utils-config alsa-tools \
libdrm-tests \
libdrm-kms \
bash \
diff --git a/meta-rcar-gen2/recipes-graphics/mesa/mesa-wayland.inc b/meta-rcar-gen2/recipes-graphics/mesa/mesa-wayland.inc
index a69d7d6..e9b4459 100644
--- a/meta-rcar-gen2/recipes-graphics/mesa/mesa-wayland.inc
+++ b/meta-rcar-gen2/recipes-graphics/mesa/mesa-wayland.inc
@@ -2,8 +2,19 @@
PACKAGECONFIG[gles] = "--enable-gles1 --disable-gles2"
PACKAGECONFIG[egl] = "--enable-egl --with-egl-platforms=wayland"
-FILESEXTRAPATHS_append := ":${THISDIR}/mesa_10.1.3/"
-SRC_URI += "file://0001-egl_dri2-fix-wayland_platform-when-drm_platform-is-n.patch"
+python do_srcrev_check() {
+ if d.getVar('SRCREV') == 'INVALID':
+ d.setVar('SRCREV', '"%s"' % d.getVarFlags('SRC_URI')['md5sum'])
+}
+do_patch[prefuncs] += "do_srcrev_check"
+
+# mesa v10.1.3 == ba6dbe2b9cab0b4de840c996b9b6a3ad
+# mesa v10.6.3 == 553e525d2f20ed48fca8f1ec3176fd83
+FILESEXTRAPATHS_append := ":${THISDIR}/mesa_10.1.3/:${THISDIR}/mesa_10.6.3/"
+SRC_URI += " \
+ file://0001-egl_dri2-fix-wayland_platform-when-drm_platform-is-n.patch;rev="ba6dbe2b9cab0b4de840c996b9b6a3ad" \
+ file://0001-dri2-wayland-fixup-gcc5-build.patch;rev="553e525d2f20ed48fca8f1ec3176fd83" \
+"
# Disable the gbm modules of mesa
EXTRA_OECONF_rcar-gen2 := "${@'${EXTRA_OECONF}'.replace('--enable-gbm', '--disable-gbm')}"
diff --git a/meta-rcar-gen2/recipes-graphics/mesa/mesa_10.6.3/0001-dri2-wayland-fixup-gcc5-build.patch b/meta-rcar-gen2/recipes-graphics/mesa/mesa_10.6.3/0001-dri2-wayland-fixup-gcc5-build.patch
new file mode 100644
index 0000000..7e29bb1
--- /dev/null
+++ b/meta-rcar-gen2/recipes-graphics/mesa/mesa_10.6.3/0001-dri2-wayland-fixup-gcc5-build.patch
@@ -0,0 +1,28 @@
+From c219bad8412666983867d5144a4b552acaf5d827 Mon Sep 17 00:00:00 2001
+From: Yannick Gicquel <yannick.gicquel@iot.bzh>
+Date: Wed, 6 Jan 2016 14:04:23 +0100
+Subject: [PATCH] dri2: wayland: fixup gcc5 build
+
+Some standards headers were missing for fstat() syscall.
+
+Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
+---
+ src/egl/drivers/dri2/platform_wayland.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
+index 9914b68..f12a70a 100644
+--- a/src/egl/drivers/dri2/platform_wayland.c
++++ b/src/egl/drivers/dri2/platform_wayland.c
+@@ -36,6 +36,8 @@
+ #include <unistd.h>
+ #include <fcntl.h>
+ #include <xf86drm.h>
++#include <sys/types.h>
++#include <sys/stat.h>
+ #include <sys/mman.h>
+
+ #include "egl_dri2.h"
+--
+1.9.1
+
diff --git a/meta-rcar-gen2/recipes-graphics/wayland/libegl.bb b/meta-rcar-gen2/recipes-graphics/wayland/libegl.bb
index 49076a4..5f29449 100644
--- a/meta-rcar-gen2/recipes-graphics/wayland/libegl.bb
+++ b/meta-rcar-gen2/recipes-graphics/wayland/libegl.bb
@@ -6,7 +6,7 @@ COMPATIBLE_MACHINE = "(r8a7790|r8a7791|r8a7793|r8a7794)"
RPROVIDES_${PN} = "${@base_contains("DISTRO_FEATURES", "wayland", "libEGL.so", "", d)}"
PROVIDES = "${@base_contains("DISTRO_FEATURES", "wayland", "virtual/egl", "", d)}"
-SRCREV = "ee4bce93878d02a144ae6ebfba1eff28fe9b4442"
+SRCREV = "02b559098042a0aeb9ac63eece547868a140fa46"
SRC_URI = "git://github.com/thayama/libegl;protocol=git;branch=master \
file://0001-libegl-Remove-duplicate-header-files-of-gles-user-mo.patch"
diff --git a/meta-rcar-gen2/recipes-graphics/wayland/libgbm.bb b/meta-rcar-gen2/recipes-graphics/wayland/libgbm.bb
index e7dc398..329e972 100644
--- a/meta-rcar-gen2/recipes-graphics/wayland/libgbm.bb
+++ b/meta-rcar-gen2/recipes-graphics/wayland/libgbm.bb
@@ -4,7 +4,7 @@ SECTION = "libs"
LIC_FILES_CHKSUM = "file://gbm.c;beginline=4;endline=22;md5=5cdaac262c876e98e47771f11c7036b5"
-SRCREV = "39cad6b7f24ea65e6f7d2c2777e3fe3dda8c24c9"
+SRCREV = "d5a58c689932d42add1301c5cd323da5244374af"
SRC_URI = "git://github.com/thayama/libgbm;protocol=git;branch=master"
S = "${WORKDIR}/git"
diff --git a/meta-rcar-gen2/recipes-graphics/wayland/weston/weston-workaround-to-avoid-segfault-on-hotplug-event.patch b/meta-rcar-gen2/recipes-graphics/wayland/weston/weston-workaround-to-avoid-segfault-on-hotplug-event.patch
new file mode 100644
index 0000000..9bf5752
--- /dev/null
+++ b/meta-rcar-gen2/recipes-graphics/wayland/weston/weston-workaround-to-avoid-segfault-on-hotplug-event.patch
@@ -0,0 +1,81 @@
+From be437c6b27a2c6b83b2e60e30e5f0cdcbda28ad0 Mon Sep 17 00:00:00 2001
+From: Yannick Gicquel <yannick.gicquel@iot.bzh>
+Date: Fri, 6 Nov 2015 09:01:43 +0100
+Subject: [PATCH] weston: workaround to avoid segfault on hotplug event
+
+When user unplug/replug a monitor, HDMI link for example,
+weston segfault while calling gbm_surface_destroy from
+drm_output_destroy function.
+
+This workaround basically disable the output destroy
+mechanism on unplug/replug event callbacks. It also force
+the compositor to do a pageflip in order to refresh the
+output when it is connected back.
+
+All this workaround is under "KEEP_OUTPUTS_ON_HOTPLUG"
+compilation flag, which can be disable if required.
+
+Signed-off-by: Yannick Gicquel <yannick.gicquel@iot.bzh>
+Signed-off-by: Manuel Bachmann <mbc@iot.bzh>
+---
+ src/compositor-drm.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/compositor-drm.c b/src/compositor-drm.c
+index 2087c93..21b7776 100644
+--- a/src/compositor-drm.c
++++ b/src/compositor-drm.c
+@@ -56,6 +56,12 @@
+ #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
+ #endif
+
++/* This allow weston to keep outputs when re-attached after
++ * a previous unplug event. Comment line below to fallback
++ * to initial behavior.
++ */
++#define KEEP_OUTPUTS_ON_HOTPLUG
++
+ static int option_current_mode = 0;
+
+ enum output_config {
+@@ -2383,6 +2389,11 @@ create_outputs(struct drm_compositor *ec, uint32_t option_connector,
+ return 0;
+ }
+
++#if defined(KEEP_OUTPUTS_ON_HOTPLUG)
++static void
++drm_compositor_set_modes(struct drm_compositor *compositor);
++#endif
++
+ static void
+ update_outputs(struct drm_compositor *ec, struct udev_device *drm_device)
+ {
+@@ -2443,14 +2454,25 @@ update_outputs(struct drm_compositor *ec, struct udev_device *drm_device)
+ disconnects &= ~(1 << output->connector_id);
+ weston_log("connector %d disconnected\n",
+ output->connector_id);
++#if !defined(KEEP_OUTPUTS_ON_HOTPLUG)
+ drm_output_destroy(&output->base);
++#endif
+ }
+ }
+ }
+
++#if defined(KEEP_OUTPUTS_ON_HOTPLUG)
++ /* This refresh the display when connector is plugged back */
++ wl_list_for_each_safe(output, next, &ec->base.output_list,
++ base.link) {
++ /* FIXME: following is required only on 'connected' event. */
++ drm_compositor_set_modes(ec);
++ }
++#else
+ /* FIXME: handle zero outputs, without terminating */
+ if (ec->connector_allocator == 0)
+ wl_display_terminate(ec->base.wl_display);
++#endif
+ }
+
+ static int
+--
+1.9.1
+
diff --git a/meta-rcar-gen2/recipes-graphics/wayland/weston_1.5.0.bbappend b/meta-rcar-gen2/recipes-graphics/wayland/weston_1.5.0.bbappend
index 0f2f5a6..6a18dba 100644
--- a/meta-rcar-gen2/recipes-graphics/wayland/weston_1.5.0.bbappend
+++ b/meta-rcar-gen2/recipes-graphics/wayland/weston_1.5.0.bbappend
@@ -18,6 +18,7 @@ SRC_URI_rcar-gen2 = "git://github.com/renesas-devel/weston.git;protocol=git;bran
file://disable-wayland-scanner-pkg-check.patch \
file://make-lcms-explicitly-configurable.patch \
file://make-libwebp-explicitly-configurable.patch \
+ file://weston-workaround-to-avoid-segfault-on-hotplug-event.patch \
"
S = "${WORKDIR}/git"