[PATCH 1/3] compositor-drm: Add quirk loading from udev
Rob Bradford
rob at robster.org.uk
Fri Sep 21 07:04:15 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 0faf45c..e5ee338 100644
--- a/src/compositor-drm.c
+++ b/src/compositor-drm.c
@@ -1777,6 +1777,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
@@ -1814,6 +1822,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