summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/bpf_kfuncs.h
diff options
context:
space:
mode:
authorJason Gerecke <jason.gerecke@wacom.com>2023-12-20 00:33:43 +0300
committerJiri Kosina <jkosina@suse.com>2023-12-20 02:01:50 +0300
commit502296030ec6b0329e00f9fb15018e170cc63037 (patch)
treefad75d774a52059a193732306ad4abb33280fab2 /tools/testing/selftests/bpf/bpf_kfuncs.h
parentfd2a9b29dc9c4c35def91d5d1c5b470843539de6 (diff)
downloadlinux-502296030ec6b0329e00f9fb15018e170cc63037.tar.xz
HID: wacom: Correct behavior when processing some confidence == false touches
There appear to be a few different ways that Wacom devices can deal with confidence: 1. If the device looses confidence in a touch, it will first clear the tipswitch flag in one report, and then clear the confidence flag in a second report. This behavior is used by e.g. DTH-2452. 2. If the device looses confidence in a touch, it will clear both the tipswitch and confidence flags within the same report. This behavior is used by some AES devices. 3. If the device looses confidence in a touch, it will clear *only* the confidence bit. The tipswitch bit will remain set so long as the touch is tracked. This behavior may be used in future devices. The driver does not currently handle situation 3 properly. Touches that loose confidence will remain "in prox" and essentially frozen in place until the tipswitch bit is finally cleared. Not only does this result in userspace seeing a stuck touch, but it also prevents pen arbitration from working properly (the pen won't send events until all touches are up, but we don't currently process events from non-confident touches). This commit centralizes the checking of the confidence bit in the wacom_wac_finger_slot() function and has 'prox' depend on it. In the case where situation 3 is encountered, the treat the touch as though it was removed, allowing both userspace and the pen arbitration to act normally. Signed-off-by: Tatsunosuke Tobita <tatsunosuke.tobita@wacom.com> Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Fixes: 7fb0413baa7f ("HID: wacom: Use "Confidence" flag to prevent reporting invalid contacts") Cc: stable@vger.kernel.org Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'tools/testing/selftests/bpf/bpf_kfuncs.h')
0 files changed, 0 insertions, 0 deletions