backend/native: Ignore not found errors when adding drm device in headless
When testing mutter using `META_DBUS_RUNNER_WRAPPER=rr` we may get a not found-device error, given that it's not a case we support, we can ignore it as we do with permission denied one, limiting this to the RR case. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3793>
This commit is contained in:
parent
2a1cc195a3
commit
c6631077d7
@ -647,8 +647,11 @@ init_gpus (MetaBackendNative *native,
|
|||||||
if (!add_drm_device (native, device, &device_error))
|
if (!add_drm_device (native, device, &device_error))
|
||||||
{
|
{
|
||||||
if (meta_backend_is_headless (backend) &&
|
if (meta_backend_is_headless (backend) &&
|
||||||
g_error_matches (device_error, G_IO_ERROR,
|
(g_error_matches (device_error, G_IO_ERROR,
|
||||||
G_IO_ERROR_PERMISSION_DENIED))
|
G_IO_ERROR_PERMISSION_DENIED) ||
|
||||||
|
(g_strcmp0 (g_getenv ("RUNNING_UNDER_RR"), "1") == 0 &&
|
||||||
|
g_error_matches (device_error, G_IO_ERROR,
|
||||||
|
G_IO_ERROR_NOT_FOUND))))
|
||||||
{
|
{
|
||||||
meta_topic (META_DEBUG_BACKEND,
|
meta_topic (META_DEBUG_BACKEND,
|
||||||
"Ignoring unavailable gpu '%s': %s'",
|
"Ignoring unavailable gpu '%s': %s'",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user