kernel_samsung_a53x/drivers/hid
Jason Gerecke 3629ef1316 HID: wacom: Correct behavior when processing some confidence == false touches
commit 502296030ec6b0329e00f9fb15018e170cc63037 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-18 12:12:48 +01:00
..
i2c-hid Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
intel-ish-hid Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
usbhid Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-a4tech.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-accutouch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-alps.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-apple.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-appleir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-asus.c HID: hid-asus: add const to read-only outgoing usb buffer 2024-11-18 12:11:57 +01:00
hid-aureal.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-axff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-belkin.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-betopff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-bigbenff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-cherry.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-chicony.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-cmedia.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-core.c HID: fix HID device resource race between HID core and debugging support 2024-11-18 12:10:54 +01:00
hid-corsair.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-cougar.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-cp2112.c hid: cp2112: Fix IRQ shutdown stopping polling for all IRQs on chip 2024-11-18 11:43:04 +01:00
hid-creative-sb0540.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-cypress.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-debug.c HID: fix HID device resource race between HID core and debugging support 2024-11-18 12:10:54 +01:00
hid-dr.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-elan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-elecom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-elo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-emsff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-ezkey.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-gaff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-gembird.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-generic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-gfrm.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-glorious.c HID: glorious: fix Glorious Model I HID report 2024-11-18 12:11:56 +01:00
hid-google-hammer.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-gt683r.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-gyration.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-holtek-kbd.c HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event 2024-11-08 11:26:16 +01:00
hid-holtek-mouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-holtekff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-hyperv.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-icade.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-ids.h HID: glorious: fix Glorious Model I HID report 2024-11-18 12:11:56 +01:00
hid-input.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-ite.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-jabra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-kensington.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-keytouch.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-kye.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lcpower.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-led.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lenovo.c HID: lenovo: Restrict detection of patched firmware only to USB cptkbd 2024-11-18 12:11:48 +01:00
hid-lg-g15.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lg.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lg2ff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lg3ff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lg4ff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lg4ff.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-lgff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-logitech-dj.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-logitech-hidpp.c HID: logitech-hidpp: Move get_wireless_feature_index() check to hidpp_connect_event() 2024-11-18 11:43:04 +01:00
hid-macally.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-magicmouse.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-maltron.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-mcp2221.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-mf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-microsoft.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-monterey.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-multitouch.c HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad 2024-11-18 12:11:56 +01:00
hid-nintendo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-nti.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-ntrig.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-ortek.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-penmount.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-petalynx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-picolcd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-picolcd_backlight.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-picolcd_cir.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-picolcd_core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-picolcd_debugfs.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-picolcd_fb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-picolcd_lcd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-picolcd_leds.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-pl.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-plantronics.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-playstation.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-primax.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-prodikeys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-quirks.c HID: add ALWAYS_POLL quirk for Apple kb 2024-11-18 12:11:56 +01:00
hid-redragon.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-retrode.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-rmi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-arvo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-arvo.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-common.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-isku.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-isku.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-kone.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-kone.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-koneplus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-koneplus.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-konepure.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-kovaplus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-kovaplus.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-lua.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-lua.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-pyra.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-pyra.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-ryos.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-savu.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat-savu.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-roccat.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-saitek.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-samsung.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-sensor-custom.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-sensor-hub.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-sjoy.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-sony.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-speedlink.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-steam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-steelseries.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-sunplus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-tivo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-tmff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-topseed.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-twinhan.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-u2fzero.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-uclogic-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-uclogic-params.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-uclogic-params.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-uclogic-rdesc.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-uclogic-rdesc.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-udraw-ps3.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-viewsonic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-vivaldi.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-waltop.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-wiimote-core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-wiimote-debug.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-wiimote-modules.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-wiimote.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-xinmo.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-zpff.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hid-zydacron.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
hidraw.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
uhid.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wacom.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wacom_sys.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
wacom_wac.c HID: wacom: Correct behavior when processing some confidence == false touches 2024-11-18 12:12:48 +01:00
wacom_wac.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00