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