]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Override incorrect logical maximum contact identifier
authorJason Gerecke <killertofu@gmail.com>
Wed, 19 Apr 2017 21:47:24 +0000 (14:47 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 20 Apr 2017 09:33:45 +0000 (11:33 +0200)
commite66b4125b5f89a9492d7fbe0b59a12a0038caaae
treea8ca8bf1ea48be8d4c3c70b97e39016aa336b99b
parent3107c6bfa41891934b5d97f86bbdd9198d43bc6d
HID: wacom: Override incorrect logical maximum contact identifier

It apears that devices designed around Wacom's G11 chipset (e.g. Lenovo
ThinkPad Yoga 260, Lenovo ThinkPad X1 Yoga, Dell XPS 12 9250, Dell Venue
8 Pro 5855, etc.) suffer from a common issue in their HID descriptors.
The logical maximum is not updated for the "Contact Identifier" usage,
leaving it as just "1" despite these devices being capable of tracking
far more touches.

Commit 4b68c6cdb0f6 began ignoring usages with out-of-range values,
causing problems for devices based on this chipset. Touches after
the first will have an out-of-range Contact Identifier, and ignoring
that usage will cause the kernel to incorrectly slot each finger's
events (along with all the knock-on userspace effects that entails).

This commit checks for these buggy descriptors and updates the maximum
where required. Prior chipsets have used "255" as the maximum (and the
G11, at least, doesn't seem to actually use IDs outside the range of
1..CONTACTMAX) so continue using this value.

Cc: stable@vger.kernel.org
Fixes: 4b68c6cdb0f6 ("HID: wacom: generic: add support for touchring")
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_wac.c