kathenas / rpms / mutter

Forked from rpms/mutter 5 years ago
Clone

Blame SOURCES/0001-monitor-manager-kms-Trigger-hotplug-processing-on-gp.patch

99364f
From 9f8564ce066aeb704341d6f926daec0045243b70 Mon Sep 17 00:00:00 2001
99364f
From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
99364f
Date: Thu, 25 Jun 2020 10:06:38 +0200
99364f
Subject: [PATCH 1/2] monitor-manager-kms: Trigger hotplug processing on gpu
99364f
 removal
99364f
99364f
---
99364f
 src/backends/native/meta-monitor-manager-kms.c | 16 +++++++++++-----
99364f
 1 file changed, 11 insertions(+), 5 deletions(-)
99364f
99364f
diff --git a/src/backends/native/meta-monitor-manager-kms.c b/src/backends/native/meta-monitor-manager-kms.c
99364f
index 9a0364441a..2819881576 100644
99364f
--- a/src/backends/native/meta-monitor-manager-kms.c
99364f
+++ b/src/backends/native/meta-monitor-manager-kms.c
99364f
@@ -470,12 +470,18 @@ on_uevent (GUdevClient *client,
99364f
 
99364f
       if (!g_strcmp0 (seat_id, device_seat))
99364f
         handle_gpu_hotplug (manager_kms, device);
99364f
-    }
99364f
-
99364f
-  if (!g_udev_device_get_property_as_boolean (device, "HOTPLUG"))
99364f
-    return;
99364f
 
99364f
-  handle_hotplug_event (manager);
99364f
+      handle_hotplug_event (manager);
99364f
+    }
99364f
+  else if (g_str_equal (action, "remove") &&
99364f
+           g_udev_device_get_device_file (device) != NULL)
99364f
+    {
99364f
+      handle_hotplug_event (manager);
99364f
+    }
99364f
+  else if (g_udev_device_get_property_as_boolean (device, "HOTPLUG"))
99364f
+    {
99364f
+      handle_hotplug_event (manager);
99364f
+    }
99364f
 }
99364f
 
99364f
 static void
99364f
-- 
99364f
2.26.2
99364f