diff options
Diffstat (limited to 'bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland')
8 files changed, 209 insertions, 0 deletions
diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb new file mode 100644 index 00000000..06c56f73 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libegl.bb @@ -0,0 +1,21 @@ +SUMMARY = "Recipe for libegl" +LICENSE = "CLOSED" + +COMPATIBLE_MACHINE = "(salvator-x|ulcb|ebisu)" + +DEPENDS = "gles-user-module \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \ +" + +PR = "r0" + +RDEPENDS_${PN} = " \ + gles-user-module \ + ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'libgbm wayland-kms', '', d)} \ +" + +PROVIDES = "virtual/egl" +RPROVIDES_${PN} += " \ + libegl \ + libegl1 \ +" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb new file mode 100644 index 00000000..87d52f0e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/libgbm.bb @@ -0,0 +1,36 @@ +SUMMARY = "gbm library" +LICENSE = "MIT" +SECTION = "libs" + +LIC_FILES_CHKSUM = " \ + file://gbm.c;beginline=4;endline=22;md5=5cdaac262c876e98e47771f11c7036b5" + +SRCREV = "953f6515dc07c717360c499273dccc227857e6ed" +SRC_URI = "git://github.com/renesas-rcar/libgbm;branch=match-mesa-19.0.1" + +S = "${WORKDIR}/git" + +COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" +DEPENDS = "wayland-kms udev" + +inherit autotools pkgconfig + +PACKAGES = " \ + ${PN} \ + ${PN}-dev \ + ${PN}-dbg \ + ${PN}-staticdev \ +" + +FILES_${PN} = " \ + ${libdir}/libgbm.so.* \ + ${libdir}/gbm/libgbm_kms.so.* \ + ${libdir}/gbm/*.so \ + ${libdir}/*.so \ +" +FILES_${PN}-dev += "${libdir}/gbm/*.la" +FILES_${PN}-dbg += "${libdir}/gbm/.debug/*" +FILES_${PN}-staticdev += "${libdir}/gbm/*.a" + +INSANE_SKIP_${PN} += "dev-so" +PROVIDES += "virtual/libgbm" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb new file mode 100644 index 00000000..134e8d2e --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/wayland-kms_1.6.0.bb @@ -0,0 +1,25 @@ +SUMMARY = "KMS library for Wayland" +LICENSE = "MIT" + +LIC_FILES_CHKSUM = " \ + file://wayland-kms.c;beginline=6;endline=24;md5=5cdaac262c876e98e47771f11c7036b5" + +PV_append = "+git${SRCREV}" + +SRCREV = "15184e5bd3701938a6b30b8f03b471477fc742e8" +SRC_URI = "git://github.com/renesas-rcar/wayland-kms.git;branch=rcar-gen3" + +COMPATIBLE_MACHINE = "(r8a7795|r8a7796|r8a77965|r8a77990)" +S = "${WORKDIR}/git" +DEPENDS = "libdrm wayland gles-user-module wayland-native" + +inherit autotools pkgconfig + +FILES_${PN} = "${libdir}/libwayland-kms.so.*" +FILES_${PN}-dev = " \ + ${libdir}/libwayland-kms.la \ + ${libdir}/libwayland-kms.so \ + ${libdir}/pkgconfig/* \ + ${includedir}/* \ +" +FILES_${PN}-staticdev += "${libdir}/libwayland-kms.a" diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend new file mode 100644 index 00000000..17225873 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init.bbappend @@ -0,0 +1,48 @@ +require include/gles-control.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_rcar-gen3 = " \ + file://weston.ini \ + file://weston.sh \ +" + +do_install_append_rcar-gen3() { + if [ "X${USE_GLES}" = "X1" ]; then + sed -e "/^After=/s/$/ dbus.service multi-user.target/" \ + -e "s/\$OPTARGS/--idle-time=0 \$OPTARGS/" \ + -i ${D}/${systemd_system_unitdir}/weston@.service + fi + + install -d ${D}/${sysconfdir}/xdg/weston + # install weston.ini as sample settings of gl-renderer + install -m 644 ${WORKDIR}/weston.ini ${D}/${sysconfdir}/xdg/weston/ + + # Checking for ivi-shell configuration + # If ivi-shell is enable, we will add its configs to weston.ini + if [ "X${USE_WAYLAND_IVI_SHELL}" = "X1" ]; then + sed -i '/repaint-window=34/c\repaint-window=34\nshell=ivi-shell.so' \ + ${D}/${sysconfdir}/xdg/weston/weston.ini + sed -e '$a\\' \ + -e '$a\[ivi-shell]' \ + -e '$a\ivi-module=ivi-controller.so' \ + -e '$a\ivi-input-module=ivi-input-controller.so' \ + -e '$a\transition-duration=300' \ + -e '$a\cursor-theme=default' \ + -i ${D}/${sysconfdir}/xdg/weston/weston.ini + fi + + # Set XDG_RUNTIME_DIR to /run/user/$UID (e.g. run/user/0) + install -d ${D}/${sysconfdir}/profile.d + install -m 0755 ${WORKDIR}/weston.sh ${D}/${sysconfdir}/profile.d/weston.sh + + # Fix weston.service and weston@.service run simultaneously. + mv ${D}/${sysconfdir}/init.d/weston ${D}/${sysconfdir}/init.d/weston@ +} + +FILES_${PN}_append_rcar-gen3 = " \ + ${sysconfdir}/profile.d/weston.sh \ +" + +INITSCRIPT_NAME = "weston@" + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.ini b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.ini new file mode 100644 index 00000000..f31c2906 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.ini @@ -0,0 +1,2 @@ +[core] +repaint-window=34 diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.sh b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.sh new file mode 100755 index 00000000..33ed8a4a --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston-init/weston.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if test -z "$XDG_RUNTIME_DIR"; then + export XDG_RUNTIME_DIR=/run/user/$UID +fi diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-drm-change-timing-to-set-color-format-for-primary-pl.patch b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-drm-change-timing-to-set-color-format-for-primary-pl.patch new file mode 100644 index 00000000..2c797df8 --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston/0001-drm-change-timing-to-set-color-format-for-primary-pl.patch @@ -0,0 +1,49 @@ +From 51048463dae4ace13776bb77675316007083a6ee Mon Sep 17 00:00:00 2001 +From: Tomohito Esaki <etom@igel.co.jp> +Date: Mon, 30 Mar 2020 17:10:54 +0900 +Subject: [PATCH] drm: change timing to set color format for primary plane + without universal plane + +Without universal plane, the weston crashes with null pointer access in +set_gbm_format function because that function called before output +enable function. By changing timing to set color format for primary +plane in this case, this issue fixes. + +Signed-off-by: Tomohito Esaki <etom@igel.co.jp> +--- + libweston/backend-drm/drm.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c +index 3c5ca65..2aea82f 100644 +--- a/libweston/backend-drm/drm.c ++++ b/libweston/backend-drm/drm.c +@@ -1389,12 +1389,6 @@ drm_output_set_gbm_format(struct weston_output *base, + + if (parse_gbm_format(gbm_format, b->gbm_format, &output->gbm_format) == -1) + output->gbm_format = b->gbm_format; +- +- /* Without universal planes, we can't discover which formats are +- * supported by the primary plane; we just hope that the GBM format +- * works. */ +- if (!b->universal_planes) +- output->scanout_plane->formats[0].format = output->gbm_format; + } + + static void +@@ -1626,6 +1620,12 @@ drm_output_init_crtc(struct drm_output *output, drmModeRes *resources) + goto err_crtc; + } + ++ /* Without universal planes, we can't discover which formats are ++ * supported by the primary plane; we just hope that the GBM format ++ * works. */ ++ if (!b->universal_planes) ++ output->scanout_plane->formats[0].format = output->gbm_format; ++ + /* Failing to find a cursor plane is not fatal, as we'll fall back + * to software cursor. */ + output->cursor_plane = +-- +2.7.4 + diff --git a/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend new file mode 100644 index 00000000..c2f75afc --- /dev/null +++ b/bsp/meta-renesas/meta-rcar-gen3/recipes-graphics/wayland/weston_%.bbappend @@ -0,0 +1,23 @@ +require include/gles-control.inc +require include/multimedia-control.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_rcar-gen3 = " \ + file://0001-drm-change-timing-to-set-color-format-for-primary-pl.patch \ +" + +PACKAGECONFIG_remove_virtclass-multilib-lib32 = "launch" + +DEPENDS_append_rcar-gen3 = " \ + ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)}" + +RDEPENDS_${PN}_append_rcar-gen3 = " \ + ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)} \ +" +RDEPENDS_${PN}-examples_append_rcar-gen3 = " \ + ${@oe.utils.conditional('USE_GLES', '1', ' libgbm', '', d)}" + +EXTRA_OECONF_append_rcar-gen3 = " \ + ${@oe.utils.conditional('USE_GLES', '1', '', \ + ' WESTON_NATIVE_BACKEND="fbdev-backend.so"', d)}" |