]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
HID: multitouch: Honor ContactCount for Yoga Book 9 to suppress ghost contacts
authorDave Carey <carvsdriver@gmail.com>
Thu, 14 May 2026 19:32:58 +0000 (15:32 -0400)
committerJiri Kosina <jkosina@suse.com>
Wed, 10 Jun 2026 16:28:19 +0000 (18:28 +0200)
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 <carvsdriver@gmail.com>
Tested-by: Dave Carey <carvsdriver@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-multitouch.c

index ec04dbafbd99580be5627f76486d3ad5acfc2c18..507c34f4aa2daaeee9784da4d387819d3da40bbf 100644 (file)
@@ -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 |