egl/wayland: Fix possible lockup in drm initialization
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Fri, 29 Apr 2011 15:04:11 +0000 (17:04 +0200)
committerBenjamin Franzke <benjaminfranzke@googlemail.com>
Fri, 29 Apr 2011 15:05:16 +0000 (17:05 +0200)
Lockup happens when wl_drm interface is not available.

src/egl/drivers/dri2/platform_wayland.c
src/gallium/state_trackers/egl/wayland/native_drm.c

index 030c68777af1611cd8b27b31898246589256f344..1b75ffea0c51192baf6611792eb99bd4f1f5c4d2 100644 (file)
@@ -680,7 +680,7 @@ dri2_initialize_wayland(_EGLDriver *drv, _EGLDisplay *disp)
 
    id = wl_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);
    if (id == 0)
-      wl_display_iterate(dri2_dpy->wl_dpy, WL_DISPLAY_READABLE);
+      force_roundtrip(dri2_dpy->wl_dpy);
    id = wl_display_get_global(dri2_dpy->wl_dpy, "wl_drm", 1);
    if (id == 0)
       goto cleanup_dpy;
index 75c871d6030eaa07d18e58f2cfbd65b97d2666ea..604720f6e5f89d450090bbfefd37c97654e8d45e 100644 (file)
@@ -205,7 +205,7 @@ wayland_drm_display_init_screen(struct native_display *ndpy)
 
    id = wl_display_get_global(drmdpy->base.dpy, "wl_drm", 1);
    if (id == 0)
-      wl_display_iterate(drmdpy->base.dpy, WL_DISPLAY_READABLE);
+      force_roundtrip(drmdpy->base.dpy);
    id = wl_display_get_global(drmdpy->base.dpy, "wl_drm", 1);
    if (id == 0)
       return FALSE;