[xorg-x11-server/f18] fix bug when hotplugging a monitor causes oops

Dave Airlie airlied at fedoraproject.org
Fri Sep 14 03:38:19 UTC 2012


commit be4655a040b452f74c4aadc9756f39de77e996a8
Author: Dave Airlie <airlied at redhat.com>
Date:   Fri Sep 14 13:38:07 2012 +1000

    fix bug when hotplugging a monitor causes oops

 ...-config-udev-ignore-change-on-drm-devices.patch |   41 ++++++++++++++++++++
 1 files changed, 41 insertions(+), 0 deletions(-)
---
diff --git a/0001-config-udev-ignore-change-on-drm-devices.patch b/0001-config-udev-ignore-change-on-drm-devices.patch
new file mode 100644
index 0000000..5e6a2a0
--- /dev/null
+++ b/0001-config-udev-ignore-change-on-drm-devices.patch
@@ -0,0 +1,41 @@
+From 6d9beff6ce231527dfd59e896c6cf3730555121a Mon Sep 17 00:00:00 2001
+From: Dave Airlie <airlied at gmail.com>
+Date: Thu, 13 Sep 2012 18:44:06 +1000
+Subject: [PATCH] config/udev: ignore change on drm devices
+
+for input devices we handle change like remove/add, but for
+drm devices we get change events when we hotplug outputs,
+so lets just ignore change at this level, and let the drivers
+handle it. We may in the future want to route driver udev
+from here instead.
+
+Reported-by: Timo Aaltonen <timo.aaltonen at canonical.com>
+Signed-off-by: Dave Airlie <airlied at redhat.com>
+---
+ config/udev.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/config/udev.c b/config/udev.c
+index c2d00bb..454838f 100644
+--- a/config/udev.c
++++ b/config/udev.c
+@@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask)
+             return;
+         action = udev_device_get_action(udev_device);
+         if (action) {
+-            if (!strcmp(action, "add") || !strcmp(action, "change")) {
++            if (!strcmp(action, "add")) {
+                 device_removed(udev_device);
+                 device_added(udev_device);
++            } else if (!strcmp(action, "change")) {
++                /* ignore change for the drm devices */
++                if (strcmp(udev_device_get_subsystem(udev_device), "drm")) {
++                    device_removed(udev_device);
++                    device_added(udev_device);
++                }
+             }
+             else if (!strcmp(action, "remove"))
+                 device_removed(udev_device);
+-- 
+1.7.10.2
+


More information about the scm-commits mailing list