diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-08-21 13:08:09 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-08-22 22:21:47 +0100 |
commit | 15eeb6d96096659aae0f8a5e7c4fbdb704886fa9 (patch) | |
tree | d3300ac42c7c23b31b24feae30e726504224f6de /meta | |
parent | da768360dd68ecd164c15397ab222892f0123307 (diff) | |
download | poky-15eeb6d96096659aae0f8a5e7c4fbdb704886fa9.tar.gz |
weston: Re-order gbm destruction at DRM-backend tear down
Fixes an annoying segfault seen on rpi4 when launching weston during
boot especially using systemd service or sysvinit script, if weston is
launched manually on VT, it works fine. This backport specifically
addresses the issue described above.
For more details see [1]
[1] https://gitlab.freedesktop.org/wayland/weston/-/issues/314
(From OE-Core rev: 74e0249af85782af436791d1339ce864536d2022)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch | 50 | ||||
-rw-r--r-- | meta/recipes-graphics/wayland/weston_9.0.0.bb | 1 |
2 files changed, 51 insertions, 0 deletions
diff --git a/meta/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch b/meta/recipes-graphics/wayland/weston/0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch new file mode 100644 index 0000000000..f8f7589499 --- /dev/null +++ b/meta/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/meta/recipes-graphics/wayland/weston_9.0.0.bb b/meta/recipes-graphics/wayland/weston_9.0.0.bb index fbf181b4a6..cbc2e6a1cd 100644 --- a/meta/recipes-graphics/wayland/weston_9.0.0.bb +++ b/meta/recipes-graphics/wayland/weston_9.0.0.bb | |||
@@ -12,6 +12,7 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \ | |||
12 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ | 12 | file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \ |
13 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ | 13 | file://0001-tests-include-fcntl.h-for-open-O_RDWR-O_CLOEXEC-and-.patch \ |
14 | file://0001-meson.build-fix-incorrect-header.patch \ | 14 | file://0001-meson.build-fix-incorrect-header.patch \ |
15 | file://0001-libweston-backend-drm-Re-order-gbm-destruction-at-DR.patch \ | ||
15 | " | 16 | " |
16 | 17 | ||
17 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " | 18 | SRC_URI:append:libc-musl = " file://dont-use-plane-add-prop.patch " |