OSDN Git Service

HID: multitouch: fix rare Win 8 cases when the touch up event gets missing
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 15 Jun 2017 13:32:04 +0000 (15:32 +0200)
committerJiri Kosina <jkosina@suse.cz>
Fri, 23 Jun 2017 08:16:16 +0000 (10:16 +0200)
commit4f4001bc76fd1a138a501fbd3d68cce72cbf96ce
treea7a503fffbf7a8a60d5fe243133b52a3b2ddea69
parentfd91189654a36f9566fedfd8ce6f4c5959c099bc
HID: multitouch: fix rare Win 8 cases when the touch up event gets missing

Instead of blindly trusting the hardware to send us release, we should
consider some events can get lost and release them when we judge time has
come.

The Windows 8 spec allows to be confident in the fact that the device
will continuously report events when a finger touches the surface.
This has been tested on the HID recording database I have, and all of
those devices behave properly.
Also, Arek tested it on his Lenovo Yoga 910, which exports such bug in
some situations, when the movements are rather slow.

We use an atomic bit here to guard against concurrent accesses to the mt
slots because both mt_process_mt_event() and mt_expired_timeout() are
called in interrupt context.

Signed-off-by: Arek Burdach <arek.burdach@gmail.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Arek Burdach <arek.burdach@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-multitouch.c