egl/wayland: Fix possible lockup in drm initialization
Lockup happens when wl_drm interface is not available.
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user