[PATCH libinput] quirk for mtk kernels

Andreas Pokorny andreas.pokorny at canonical.com
Fri Aug 21 13:33:08 PDT 2015


Signed-off-by: Andreas Pokorny <andreas.pokorny at canonical.com>
---
 src/evdev.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/evdev.c b/src/evdev.c
index 29303f8..1373e6f 100644
--- a/src/evdev.c
+++ b/src/evdev.c
@@ -1886,6 +1886,16 @@ evdev_check_min_max(struct evdev_device *device, unsigned int code)
 			libevdev_disable_event_code(device->evdev,
 						    EV_ABS,
 						    code);
+		/* mediatek kernels tend to mangle the initialization routines
+		 * for a set of touch screen drivers, so they report a broken
+		 * value range on ABS_MT_TRACKING_ID
+		 */
+		} else if (absinfo->minimum == 0 &&
+			   code == ABS_MT_TRACKING_ID) {
+			log_bug_kernel(device->base.seat->libinput,
+				       "Device '%s' has min == max == 0 on %s\n",
+				       device->devname,
+				       libevdev_event_code_get_name(EV_ABS, code));
 		} else {
 			log_bug_kernel(device->base.seat->libinput,
 				       "Device '%s' has min == max on %s\n",
-- 
2.1.4



More information about the wayland-devel mailing list