native: Properly ignore devices on init too

There is an udev rule marking whether a device should be ignored by
mutter or not, but it was only respected on hotplug events not on init,
partly defeating its purpose. Fix this.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1892>
This commit is contained in:
Jonas Ådahl 2021-05-17 10:32:19 +02:00 committed by Marge Bot
parent fcdda41def
commit c0758c63b5

View File

@ -516,6 +516,13 @@ init_gpus (MetaBackendNative *native,
MetaGpuKms *gpu_kms; MetaGpuKms *gpu_kms;
GError *local_error = NULL; GError *local_error = NULL;
if (meta_is_udev_device_ignore (device))
{
g_message ("Ignoring DRM device '%s' (from udev rule)",
g_udev_device_get_device_file (device));
continue;
}
gpu_kms = create_gpu_from_udev_device (native, device, &local_error); gpu_kms = create_gpu_from_udev_device (native, device, &local_error);
if (!gpu_kms) if (!gpu_kms)