xserver: Branch 'master' - 2 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 5 09:55:15 UTC 2024


 hw/xwayland/xwayland-glamor-gbm.c |    3 +++
 hw/xwayland/xwayland-output.c     |    3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 8c4b137237498f9f67e0e44e650edcb39851c870
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Thu Oct 31 18:15:42 2024 +0100

    xwayland: Always decrement expecting_event in xwl_output_create
    
    If we bail without decrementing it, xwl_screen_init will keep waiting
    indefinitely for an event which never arrives.
    
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1739>

diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c
index 7300af48a..dd0d71690 100644
--- a/hw/xwayland/xwayland-output.c
+++ b/hw/xwayland/xwayland-output.c
@@ -910,6 +910,8 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id,
     struct xwl_output *xwl_output;
     char name[MAX_OUTPUT_NAME] = { 0 };
 
+    --xwl_screen->expecting_event;
+
     xwl_output = calloc(1, sizeof *xwl_output);
     if (xwl_output == NULL) {
         ErrorF("%s ENOMEM\n", __func__);
@@ -958,7 +960,6 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id,
      * use it when binding to the xdg-output protocol...
      */
     xorg_list_append(&xwl_output->link, &xwl_screen->output_list);
-    --xwl_screen->expecting_event;
 
     if (xwl_screen->xdg_output_manager)
         xwl_output_get_xdg_output(xwl_output);
commit 375c35a5e4049603b3e973b2ed6a2b85317df9e7
Author: Michel Dänzer <mdaenzer at redhat.com>
Date:   Thu Oct 31 18:06:23 2024 +0100

    xwayland/glamor: Drop expecting_event bailing from xwl_drm_handle_device
    
    If we bail without decrementing xwl_screen->expecting_event,
    xwl_screen_init will keep waiting indefinitely for an event which never
    arrives.
    
    Closes: https://gitlab.freedesktop.org/xorg/xserver/-/issues/1648
    Fixes: 2f113d68f6c1 ("xwayland: Add glamor and DRI3 support")
    Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1739>

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 45f18a47c..21c0dd594 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -1318,6 +1318,7 @@ xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device)
 
    if (!xwl_gbm->device_name) {
        xwl_glamor_gbm_cleanup(xwl_screen);
+       xwl_screen->expecting_event--;
        return;
    }
 
@@ -1326,12 +1327,14 @@ xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device)
        ErrorF("wayland-egl: could not open %s (%s)\n",
               xwl_gbm->device_name, strerror(errno));
        xwl_glamor_gbm_cleanup(xwl_screen);
+       xwl_screen->expecting_event--;
        return;
    }
 
    if (drmGetDevice2(xwl_gbm->drm_fd, 0, &xwl_gbm->device) != 0) {
        ErrorF("wayland-egl: Could not fetch DRM device %s\n",
               xwl_gbm->device_name);
+       xwl_screen->expecting_event--;
        return;
    }
 


More information about the xorg-commit mailing list