|
1
|
+From: =?utf-8?q?Michel_D=C3=A4nzer?= <mdaenzer@redhat.com>
|
|
2
|
+Date: Thu, 31 Oct 2024 18:06:23 +0100
|
|
3
|
+Subject: xwayland/glamor: Drop expecting_event bailing from
|
|
4
|
+ xwl_drm_handle_device
|
|
5
|
+
|
|
6
|
+If we bail without decrementing xwl_screen->expecting_event,
|
|
7
|
+xwl_screen_init will keep waiting indefinitely for an event which never
|
|
8
|
+arrives.
|
|
9
|
+
|
|
10
|
+Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1648
|
|
11
|
+Fixes: 2f113d68f6c1 ("xwayland: Add glamor and DRI3 support")
|
|
12
|
+Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1739>
|
|
13
|
+
|
|
14
|
+Origin: upstream, https://gitlab.freedesktop.org/xorg/xserver/-/commit/375c35a5e4049603b3e973b2ed6a2b85317df9e7
|
|
15
|
+---
|
|
16
|
+ hw/xwayland/xwayland-glamor-gbm.c | 3 +++
|
|
17
|
+ 1 file changed, 3 insertions(+)
|
|
18
|
+
|
|
19
|
+diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
|
|
20
|
+index dc93946..a21a658 100644
|
|
21
|
+--- a/hw/xwayland/xwayland-glamor-gbm.c
|
|
22
|
++++ b/hw/xwayland/xwayland-glamor-gbm.c
|
|
23
|
+@@ -1342,6 +1342,7 @@ xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
|
24
|
+
|
|
25
|
+ if (!xwl_gbm->device_name) {
|
|
26
|
+ xwl_glamor_gbm_cleanup(xwl_screen);
|
|
27
|
++ xwl_screen->expecting_event--;
|
|
28
|
+ return;
|
|
29
|
+ }
|
|
30
|
+
|
|
31
|
+@@ -1350,12 +1351,14 @@ xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device)
|
|
32
|
+ ErrorF("wayland-egl: could not open %s (%s)\n",
|
|
33
|
+ xwl_gbm->device_name, strerror(errno));
|
|
34
|
+ xwl_glamor_gbm_cleanup(xwl_screen);
|
|
35
|
++ xwl_screen->expecting_event--;
|
|
36
|
+ return;
|
|
37
|
+ }
|
|
38
|
+
|
|
39
|
+ if (drmGetDevice2(xwl_gbm->drm_fd, 0, &xwl_gbm->device) != 0) {
|
|
40
|
+ ErrorF("wayland-egl: Could not fetch DRM device %s\n",
|
|
41
|
+ xwl_gbm->device_name);
|
|
42
|
++ xwl_screen->expecting_event--;
|
|
43
|
+ return;
|
|
44
|
+ }
|
|
45
|
+ |