diff options
author | Dave Airlie <airlied@gmail.com> | 2012-09-13 18:44:06 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-11-02 10:17:40 +1000 |
commit | 1e8c960f8777a889fbc17c8711b3e68fd094427b (patch) | |
tree | 27dd80c0a9c9bd0773f0617164844b8898171dad | |
parent | c7c07558919102f06aeb3fad5f856f04e6757a76 (diff) |
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@canonical.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit e0b92f5f86f8ce71ab4c80e9902e51e2525f9705)
-rw-r--r-- | config/udev.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/config/udev.c b/config/udev.c index c2d00bbda..454838f4c 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); |