diff options
Diffstat (limited to 'recipes-graphics/wayland/weston')
5 files changed, 92 insertions, 3 deletions
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 index 00000000..f8f75894 --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch | |||
@@ -0,0 +1,50 @@ | |||
1 | From c8bfa1f8d576cdc6d515dbbac36c48c6166be0d5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Marius Vlad <marius.vlad@collabora.com> | ||
3 | Date: Thu, 1 Apr 2021 00:12:00 +0300 | ||
4 | Subject: [PATCH] libweston/backend-drm: Re-order gbm destruction at DRM-backend tear down | ||
5 | |||
6 | Tearing down the drm-backend when there are no input devices, would call | ||
7 | for the gbm device destruction before compositor shutdown. The latter | ||
8 | would call into the renderer detroy function and assume that the | ||
9 | EGLDisplay, which was created using the before-mentioned gbm device, is | ||
10 | still available. This patch re-orders the gbm destruction after the | ||
11 | compositor shutdown when no one would make use of it. | ||
12 | |||
13 | Fixes: #314 | ||
14 | |||
15 | Signed-off-by: Marius Vlad <marius.vlad@collabora.com> | ||
16 | Suggested-by: Daniel Stone <daniel.stone@collabora.com> | ||
17 | |||
18 | Upstream-Status: Backport [https://gitlab.freedesktop.org/wayland/weston/-/commit/d171c7b3ba346c4d0bd6494f45ebf0be3c3cc5fb] | ||
19 | --- | ||
20 | libweston/backend-drm/drm.c | 8 ++++---- | ||
21 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
22 | |||
23 | diff --git a/libweston/backend-drm/drm.c b/libweston/backend-drm/drm.c | ||
24 | index 2780f3b..fbcfeca 100644 | ||
25 | --- a/libweston/backend-drm/drm.c | ||
26 | +++ b/libweston/backend-drm/drm.c | ||
27 | @@ -3025,10 +3025,6 @@ err_drm_source: | ||
28 | err_udev_input: | ||
29 | udev_input_destroy(&b->input); | ||
30 | err_sprite: | ||
31 | -#ifdef BUILD_DRM_GBM | ||
32 | - if (b->gbm) | ||
33 | - gbm_device_destroy(b->gbm); | ||
34 | -#endif | ||
35 | destroy_sprites(b); | ||
36 | err_udev_dev: | ||
37 | udev_device_unref(drm_device); | ||
38 | @@ -3038,6 +3034,10 @@ err_launcher: | ||
39 | weston_launcher_destroy(compositor->launcher); | ||
40 | err_compositor: | ||
41 | weston_compositor_shutdown(compositor); | ||
42 | +#ifdef BUILD_DRM_GBM | ||
43 | + if (b->gbm) | ||
44 | + gbm_device_destroy(b->gbm); | ||
45 | +#endif | ||
46 | free(b); | ||
47 | return NULL; | ||
48 | } | ||
49 | -- | ||
50 | 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 index 00000000..06e0f7ba --- /dev/null +++ b/recipes-graphics/wayland/weston/0001-meson.build-fix-incorrect-header.patch | |||
@@ -0,0 +1,32 @@ | |||
1 | From a2ba4714a6872e547621d29d9ddcb0f374b88cf6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Tue, 20 Apr 2021 20:42:18 -0700 | ||
4 | Subject: [PATCH] meson.build: fix incorrect header | ||
5 | |||
6 | The wayland.c actually include 'xdg-shell-client-protocol.h' instead of | ||
7 | the server one, so fix it. Otherwise, it's possible to get build failure | ||
8 | due to race condition. | ||
9 | |||
10 | Upstream-Status: Pending | ||
11 | |||
12 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
13 | --- | ||
14 | libweston/backend-wayland/meson.build | 2 +- | ||
15 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
16 | |||
17 | diff --git a/libweston/backend-wayland/meson.build b/libweston/backend-wayland/meson.build | ||
18 | index 7e82513..29270b5 100644 | ||
19 | --- a/libweston/backend-wayland/meson.build | ||
20 | +++ b/libweston/backend-wayland/meson.build | ||
21 | @@ -10,7 +10,7 @@ srcs_wlwl = [ | ||
22 | fullscreen_shell_unstable_v1_protocol_c, | ||
23 | presentation_time_protocol_c, | ||
24 | presentation_time_server_protocol_h, | ||
25 | - xdg_shell_server_protocol_h, | ||
26 | + xdg_shell_client_protocol_h, | ||
27 | xdg_shell_protocol_c, | ||
28 | ] | ||
29 | |||
30 | -- | ||
31 | 2.30.2 | ||
32 | |||
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 3279a728..f6ebfd8f 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 | |||
@@ -11,7 +11,7 @@ Since starting weston as root is a valid use case by itself, if | |||
11 | PAM is not available, provide a default version of weston-launch | 11 | PAM is not available, provide a default version of weston-launch |
12 | without non-root-user support. | 12 | without non-root-user support. |
13 | 13 | ||
14 | Upstream-Status: Pending | 14 | Upstream-Status: Denied [https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/725] |
15 | 15 | ||
16 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> | 16 | Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com> |
17 | Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> | 17 | 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 index 00000000..a97e7b38 --- /dev/null +++ b/recipes-graphics/wayland/weston/systemd-notify.weston-start | |||
@@ -0,0 +1,9 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | # SPDX-FileCopyrightText: Huawei Inc. | ||
4 | # SPDX-License-Identifier: Apache-2.0 | ||
5 | |||
6 | |||
7 | if [[ -x "/usr/lib/weston/systemd-notify.so" ]]; then | ||
8 | add_weston_module "systemd-notify.so" | ||
9 | fi | ||
diff --git a/recipes-graphics/wayland/weston/xwayland.weston-start b/recipes-graphics/wayland/weston/xwayland.weston-start index b483c97c..db384b1a 100644 --- a/recipes-graphics/wayland/weston/xwayland.weston-start +++ b/recipes-graphics/wayland/weston/xwayland.weston-start | |||
@@ -2,6 +2,4 @@ | |||
2 | 2 | ||
3 | if type Xwayland >/dev/null 2>/dev/null; then | 3 | if type Xwayland >/dev/null 2>/dev/null; then |
4 | mkdir -p /tmp/.X11-unix | 4 | mkdir -p /tmp/.X11-unix |
5 | |||
6 | add_weston_argument "--modules=xwayland.so" | ||
7 | fi | 5 | fi |