[mutter] udev: Don't only check 'platform' device for KMS modifier tag



commit eaf75f07060b5569133a2eac0149da9513e26eb5
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Wed Apr 28 09:56:30 2021 +0200

    udev: Don't only check 'platform' device for KMS modifier tag
    
    Only checking the 'platform' device missed the tags added for i915 and
    others, meaning the multi head configurations yet again started to fail
    due to default modifier behavior is incompatible with multi many head
    configurations.
    
    Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1769
    Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/1774
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1843>

 src/backends/native/meta-udev.c | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/backends/native/meta-udev.c b/src/backends/native/meta-udev.c
index 5d58d6b56f..9127d3bedf 100644
--- a/src/backends/native/meta-udev.c
+++ b/src/backends/native/meta-udev.c
@@ -77,22 +77,21 @@ meta_is_udev_device_boot_vga (GUdevDevice *device)
 gboolean
 meta_is_udev_device_disable_modifiers (GUdevDevice *device)
 {
-  g_autoptr (GUdevDevice) platform_device = NULL;
   const char * const * tags;
+  g_autoptr (GUdevDevice) platform_device = NULL;
+
+  tags = g_udev_device_get_tags (device);
+  if (tags && g_strv_contains (tags, "mutter-device-disable-kms-modifiers"))
+    return TRUE;
 
   platform_device = g_udev_device_get_parent_with_subsystem (device,
                                                              "platform",
                                                              NULL);
 
-  if (!platform_device)
+  if (platform_device)
+    return meta_is_udev_device_disable_modifiers (platform_device);
+  else
     return FALSE;
-
-  tags = g_udev_device_get_tags (platform_device);
-
-  if (!tags)
-    return FALSE;
-
-  return g_strv_contains (tags, "mutter-device-disable-kms-modifiers");
 }
 
 gboolean


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