]> code.ossystems Code Review - meta-freescale.git/commitdiff
weston: Update base portion of recipe
authorTom Hochstein <tom.hochstein@nxp.com>
Thu, 27 Jan 2022 23:59:12 +0000 (17:59 -0600)
committerTom Hochstein <tom.hochstein@nxp.com>
Sat, 29 Jan 2022 22:10:03 +0000 (16:10 -0600)
Update the base portion of the i.MX fork recipe to the latest OE-core
recipe c8aa0222ce2be647911114aaebcbb0d55d7caf87.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch [new file with mode: 0644]
recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch [new file with mode: 0644]
recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
recipes-graphics/wayland/weston/systemd-notify.weston-start [new file with mode: 0644]
recipes-graphics/wayland/weston/xwayland.weston-start
recipes-graphics/wayland/weston_9.0.0.imx.bb

diff --git a/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch
new file mode 100644 (file)
index 0000000..f8f7589
--- /dev/null
@@ -0,0 +1,50 @@
+From c8bfa1f8d576cdc6d515dbbac36c48c6166be0d5 Mon Sep 17 00:00:00 2001
+From: Marius Vlad <marius.vlad@collabora.com>
+Date: Thu, 1 Apr 2021 00:12:00 +0300
+Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at DRM-backend tear down
+
+Tearing down the drm-backend when there are no input devices, would call
+for the gbm device destruction before compositor shutdown. The latter
+would call into the renderer detroy function and assume that the
+EGLDisplay, which was created using the before-mentioned gbm device, is
+still available. This patch re-orders the gbm destruction after the
+compositor shutdown when no one would make use of it.
+
+Fixes: #314
+
+Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
+Suggested-by: Daniel Stone <daniel.stone@collabora.com>
+
+Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb]
+---
+ libweston/backend-drm/drm.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c
+index 2780f3b..fbcfeca 100644
+--- a/libweston/backend-drm/drm.c
++++ b/libweston/backend-drm/drm.c
+@@ -3025,10 +3025,6 @@ err_drm_source:
+ err_udev_input:
+       udev_input_destroy(&b->input);
+ err_sprite:
+-#ifdef BUILD_DRM_GBM
+-      if (b->gbm)
+-              gbm_device_destroy(b->gbm);
+-#endif
+       destroy_sprites(b);
+ err_udev_dev:
+       udev_device_unref(drm_device);
+@@ -3038,6 +3034,10 @@ err_launcher:
+       weston_launcher_destroy(compositor->launcher);
+ err_compositor:
+       weston_compositor_shutdown(compositor);
++#ifdef BUILD_DRM_GBM
++      if (b->gbm)
++              gbm_device_destroy(b->gbm);
++#endif
+       free(b);
+       return NULL;
+ }
+--
+2.33.0
diff --git a/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch b/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch
new file mode 100644 (file)
index 0000000..06e0f7b
--- /dev/null
@@ -0,0 +1,32 @@
+From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001
+From: Chen Qi <Qi.Chen@windriver.com>
+Date: Tue, 20 Apr 2021 20:42:18 -0700
+Subject: [PATCH] meson.build: fix incorrect header
+
+The wayland.c actually include 'xdg-shell-client-protocol.h' instead of
+the server one, so fix it. Otherwise, it's possible to get build failure
+due to race condition.
+
+Upstream-Status: Pending
+
+Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
+---
+ libweston/backend-wayland/meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build
+index 7e82513..29270b5 100644
+--- a/libweston/backend-wayland/meson.build
++++ b/libweston/backend-wayland/meson.build
+@@ -10,7 +10,7 @@ srcs_wlwl = [
+       fullscreen_shell_unstable_v1_protocol_c,
+       presentation_time_protocol_c,
+       presentation_time_server_protocol_h,
+-      xdg_shell_server_protocol_h,
++      xdg_shell_client_protocol_h,
+       xdg_shell_protocol_c,
+ ]
+-- 
+2.30.2
+
index 3279a728ccbc8c5b700bf1ffc771264e2e985a0a..f6ebfd8f61cc8f71f34f897620f9073cbcd1e38d 100644 (file)
@@ -11,7 +11,7 @@ Since starting weston as root is a valid use case by itself, if
 PAM is not available, provide a default version of weston-launch
 without non-root-user support.
 
-Upstream-Status: Pending
+Upstream-Status: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725]
 
 Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
 Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
diff --git a/recipes-graphics/wayland/weston/systemd-notify.weston-start b/recipes-graphics/wayland/weston/systemd-notify.weston-start
new file mode 100644 (file)
index 0000000..a97e7b3
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+  
+# SPDX-FileCopyrightText: Huawei Inc.
+# SPDX-License-Identifier: Apache-2.0
+
+
+if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then
+        add_weston_module "systemd-notify.so"
+fi
index b483c97cf1ba871e88f063e2d66f7ccb930f2aee..db384b1a53538234753797d94bcd37f9dc4c86eb 100644 (file)
@@ -2,6 +2,4 @@
 
 if type Xwayland  >/dev/null 2>/dev/null; then
        mkdir -p /tmp/.X11-unix
-
-       add_weston_argument "--modules=xwayland.so"
 fi
index 2d66dff472c294ed3b63d7f86859816da778bcb3..4b4679e3db90a33e289dbf55653ad2fbffcfdcc9 100644 (file)
@@ -3,7 +3,7 @@
 # recipe. The second section customizes the recipe for i.MX.
 
 ########### OE-core copy ##################
-# Upstream hash: 0a882490fe75915c7a119f3498df6750be25f8e0
+# Upstream hash: c8aa0222ce2be647911114aaebcbb0d55d7caf87
 
 SUMMARY = "Weston, a Wayland compositor"
 DESCRIPTION = "Weston is the reference implementation of a Wayland compositor"
@@ -16,8 +16,11 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://weston.png \
            file://weston.desktop \
            file://xwayland.weston-start \
+           file://systemd-notify.weston-start \
            file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
            file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \
+           file://0001-meson.build-fix-incorrect-header.patch \
+           file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \
 "
 
 SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch "
@@ -38,7 +41,7 @@ LDFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'lto', '-Wl,-z,undefs', '',
 
 WESTON_MAJOR_VERSION = "${@'.'.join(d.getVar('PV').split('.')[0:1])}"
 
-EXTRA_OEMESON += "-Dbackend-default=auto -Dbackend-rdp=false -Dpipewire=false"
+EXTRA_OEMESON += "-Dbackend-default=auto -Dpipewire=false"
 
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl clients', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
@@ -64,6 +67,8 @@ PACKAGECONFIG[x11] = "-Dbackend-x11=true,-Dbackend-x11=false,virtual/libx11 libx
 PACKAGECONFIG[headless] = "-Dbackend-headless=true,-Dbackend-headless=false"
 # Weston on framebuffer
 PACKAGECONFIG[fbdev] = "-Dbackend-fbdev=true,-Dbackend-fbdev=false,udev mtdev"
+# Weston on RDP
+PACKAGECONFIG[rdp] = "-Dbackend-rdp=true,-Dbackend-rdp=false,freerdp"
 # weston-launch
 PACKAGECONFIG[launch] = "-Dweston-launch=true,-Dweston-launch=false,drm"
 # VA-API desktop recorder
@@ -83,7 +88,7 @@ PACKAGECONFIG[colord] = "-Dcolor-management-colord=true,-Dcolor-management-color
 # Clients support
 PACKAGECONFIG[clients] = "-Dsimple-clients=all -Ddemo-clients=true,-Dsimple-clients= -Ddemo-clients=false"
 # Virtual remote output with GStreamer on DRM backend
-PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0"
+PACKAGECONFIG[remoting] = "-Dremoting=true,-Dremoting=false,gstreamer1.0 gstreamer1.0-plugins-base"
 # Weston with PAM support
 PACKAGECONFIG[pam] = "-Dpam=true,-Dpam=false,libpam"
 # Weston with screen-share support
@@ -114,6 +119,10 @@ do_install:append() {
                install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
        fi
 
+       if [ "${@bb.utils.contains('PACKAGECONFIG', 'systemd', 'yes', 'no', d)}" = "yes" ]; then
+               install -Dm 644 ${WORKDIR}/systemd-notify.weston-start ${D}${datadir}/weston-start/systemd-notify
+       fi
+
        if [ "${@bb.utils.contains('PACKAGECONFIG', 'launch', 'yes', 'no', d)}" = "yes" ]; then
                chmod u+s ${D}${bindir}/weston-launch
        fi