[PATCH 2/2] compositor-drm: Add quirk loading from udev
Rob Bradford
rob at robster.org.uk
Tue Sep 18 08:44:58 PDT 2012
From: Rob Bradford <rob at linux.intel.com>
Look at udev properties and then set the quirk flags based on the udev
properties that are set on the device node.
---
src/compositor-drm.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/compositor-drm.c b/src/compositor-drm.c
index 10f16bd..0d4c6bd 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1780,6 +1780,14 @@ drm_restore(struct weston_compositor *ec)
tty_reset(d->tty);
}
+static void
+device_parse_quirks(struct evdev_device *evdev_device,
+ struct udev_device *udev_device)
+{
+ if (udev_device_get_property_value(udev_device, "WL_QUIRK_SWAP_AXES"))
+ evdev_device->quirks |= EVDEV_QUIRK_SWAP_AXES;
+}
+
static const char default_seat[] = "seat0";
static void
@@ -1817,6 +1825,9 @@ device_added(struct udev_device *udev_device, struct drm_seat *master)
return;
}
+
+ device_parse_quirks(device, udev_device);
+
wl_list_insert(master->devices_list.prev, &device->link);
}
--
1.7.11.2
More information about the wayland-devel
mailing list