backend: disable DRM backend monitor when WLR_DRM_DEVICES is used

WLR_DRM_DEVICES specifies a static list of DRM devices to open
at startup.

Do not create DRM backends for hotplugged DRM devices when it's
set.

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3595
This commit is contained in:
Simon Ser 2023-02-21 12:54:13 +01:00
parent 7303e13808
commit c667e64892
1 changed files with 3 additions and 1 deletions

View File

@ -233,7 +233,9 @@ static bool attempt_drm_backend(struct wl_display *display,
return NULL;
}
drm_backend_monitor_create(backend, primary_drm, session);
if (getenv("WLR_DRM_DEVICES") == NULL) {
drm_backend_monitor_create(backend, primary_drm, session);
}
return true;
}