~darkxst/ubuntu/raring/xorg-server/lp1073724B

« back to all changes in this revision

Viewing changes to debian/patches/229_udev-fix.diff

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen, Maarten Lankhorst, Timo Aaltonen
  • Date: 2012-09-17 15:58:32 UTC
  • Revision ID: package-import@ubuntu.com-20120917155832-gu7fmrjc0u129fj7
Tags: 2:1.13.0-0ubuntu2
[ Maarten Lankhorst ]
* Add patch to autobind gpu's

[ Timo Aaltonen ]
* Add a patch to fix drm device hotplugging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
for input devices we handle change like remove/add, but for
 
2
drm devices we get change events when we hotplug outputs,
 
3
so lets just ignore change at this level, and let the drivers
 
4
handle it. We may in the future want to route driver udev
 
5
from here instead.
 
6
 
 
7
Reported-by: Timo Aaltonen <timo.aaltonen@canonical.com>
 
8
Signed-off-by: Dave Airlie <airlied@redhat.com>
 
9
---
 
10
 config/udev.c | 8 +++++++-
 
11
 1 file changed, 7 insertions(+), 1 deletion(-)
 
12
 
 
13
diff --git a/config/udev.c b/config/udev.c
 
14
index 03aca28..4a77983 100644
 
15
--- a/config/udev.c
 
16
+++ b/config/udev.c
 
17
@@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask)
 
18
             return;
 
19
         action = udev_device_get_action(udev_device);
 
20
         if (action) {
 
21
-            if (!strcmp(action, "add") || !strcmp(action, "change")) {
 
22
+            if (!strcmp(action, "add")) {
 
23
                device_removed(udev_device);
 
24
                device_added(udev_device);
 
25
+            } else if (!strcmp(action, "change")) {
 
26
+               /* ignore change for the drm devices */
 
27
+               if (strcmp(udev_device_get_subsystem(udev_device), "drm")) {
 
28
+                       device_removed(udev_device);
 
29
+                       device_added(udev_device);
 
30
+               }
 
31
             }
 
32
             else if (!strcmp(action, "remove"))
 
33
                 device_removed(udev_device);