[mutter] native: Properly ignore devices on init too



commit c0758c63b5ef17ffe140774974bd6a63f597fca3
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Mon May 17 10:32:19 2021 +0200

    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>

 src/backends/native/meta-backend-native.c | 7 +++++++
 1 file changed, 7 insertions(+)
---
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index dbf39d7e03..9524d91f36 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -516,6 +516,13 @@ init_gpus (MetaBackendNative  *native,
       MetaGpuKms *gpu_kms;
       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);
 
       if (!gpu_kms)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]