From: Dave Carey Date: Thu, 14 May 2026 19:32:58 +0000 (-0400) Subject: HID: multitouch: Honor ContactCount for Yoga Book 9 to suppress ghost contacts X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ef257b8be9776915ca468bae6c91e31757e69734;p=thirdparty%2Fkernel%2Flinux.git HID: multitouch: Honor ContactCount for Yoga Book 9 to suppress ghost contacts The INGENIC 17EF:6161 firmware on the Lenovo Yoga Book 9 14IAH10 does not clear stale contact slots when fingers are lifted. Each HID report contains up to 10 finger slots, but only the first ContactCount slots represent valid contacts; the remaining slots retain TipSwitch=1 with positions from previous touches. Raw HID capture confirms this: across a 60-second capture with repeated multi-finger gestures, 90% of frames had more TipSwitch=1 slots than the reported ContactCount. The ContactCount field itself is always accurate. Add MT_QUIRK_CONTACT_CNT_ACCURATE to the MT_CLS_YOGABOOK9I class so the driver stops processing slots once ContactCount valid contacts have been consumed, discarding the stale ghost entries per HID specification section 17. MT_QUIRK_NOT_SEEN_MEANS_UP (already in the class) ensures that any slot skipped by this guard is released via INPUT_MT_DROP_UNUSED at frame sync. Signed-off-by: Dave Carey Tested-by: Dave Carey Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index ec04dbafbd995..507c34f4aa2da 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -445,6 +445,7 @@ static const struct mt_class mt_classes[] = { { .name = MT_CLS_YOGABOOK9I, .quirks = MT_QUIRK_NOT_SEEN_MEANS_UP | MT_QUIRK_ALWAYS_VALID | + MT_QUIRK_CONTACT_CNT_ACCURATE | MT_QUIRK_FORCE_MULTI_INPUT | MT_QUIRK_SEPARATE_APP_REPORT | MT_QUIRK_HOVERING |