Skip to content

Commit e0b92f5

Browse files
committed
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 <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
1 parent 10672a5 commit e0b92f5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

config/udev.c

+7-1
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,15 @@ wakeup_handler(pointer data, int err, pointer read_mask)
300300
return;
301301
action = udev_device_get_action(udev_device);
302302
if (action) {
303-
if (!strcmp(action, "add") || !strcmp(action, "change")) {
303+
if (!strcmp(action, "add")) {
304304
device_removed(udev_device);
305305
device_added(udev_device);
306+
} else if (!strcmp(action, "change")) {
307+
/* ignore change for the drm devices */
308+
if (strcmp(udev_device_get_subsystem(udev_device), "drm")) {
309+
device_removed(udev_device);
310+
device_added(udev_device);
311+
}
306312
}
307313
else if (!strcmp(action, "remove"))
308314
device_removed(udev_device);

0 commit comments

Comments
 (0)