Linux Input/HID development
 help / color / mirror / Atom feed
* [PATCH v11 0/2] HID: multitouch: fix haptic lifetime on delayed input release
@ 2026-10-17 16:41 Aldo Ariel Panzardo
  2026-10-17 16:41 ` [PATCH v11 1/2] HID: haptic: make FF creation the last fallible init step Aldo Ariel Panzardo
  2026-10-17 16:41 ` [PATCH v11 2/2] HID: multitouch: give FF core ownership of haptic state Aldo Ariel Panzardo
  0 siblings, 2 replies; 3+ messages in thread
From: Aldo Ariel Panzardo @ 2026-10-17 16:41 UTC (permalink / raw)
  To: jikos, bentiss
  Cc: dmitry.torokhov, linux-input, linux-kernel, stable,
	Aldo Ariel Panzardo

v10 review found that the multitouch slot setup ran before validating
the haptic class and selecting the input that owns FF. This could set
INPUT_MT_TOTAL_FORCE on an input without haptics. If no multitouch
touchpad input was found, haptic mode could remain enabled.

Patch 2 now validates the class and attaches FF before setting up MT
slots. It selects the input where multitouch touchpad pressure was
mapped with gram or newton units, so an earlier multitouch report
without haptic pressure cannot take the sole FF instance. Only that
input gets pointer emulation, total force and haptic pressure
accounting. Haptic mode is disabled if no input receives FF. Patch 1
is unchanged from v10.

Tested on x86_64 with W=1. The HID multitouch module compiled, and
QEMU/KVM with KASAN completed 10 virtual UHID haptic cycles and 10
multi-input cycles with a non-multitouch report before the multitouch
report. The tests checked FF_HAPTIC, effect upload and playback, HID
removal with an open evdev fd, and final release. Two negative fixtures
had gram pressure but either no haptic reports or no touchpad report.
With two contacts, v10 summed ABS_PRESSURE to 30 in both cases; v11
reported the oldest contact's pressure of 10. A split-report fixture
placed a multitouch report without pressure before the pressure-bearing
one; FF, INPUT_PROP_POINTER and ABS_PRESSURE were on the latter input.
No KASAN report was emitted. Physical hardware was not tested.

Base: 58161ead29e50d70a317ea26b472e0c7508e69da
v9: https://lore.kernel.org/linux-input/20261017140332.1480375-1-qwe.aldo@gmail.com/

Aldo Ariel Panzardo (2):
  HID: haptic: make FF creation the last fallible init step
  HID: multitouch: give FF core ownership of haptic state

 drivers/hid/hid-haptic.c     | 161 +++++++++++++++++------------------
 drivers/hid/hid-haptic.h     |   6 +-
 drivers/hid/hid-multitouch.c |  59 ++++++++++---
 3 files changed, 125 insertions(+), 101 deletions(-)

-- 
2.53.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-17 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-17 16:41 [PATCH v11 0/2] HID: multitouch: fix haptic lifetime on delayed input release Aldo Ariel Panzardo
2026-10-17 16:41 ` [PATCH v11 1/2] HID: haptic: make FF creation the last fallible init step Aldo Ariel Panzardo
2026-10-17 16:41 ` [PATCH v11 2/2] HID: multitouch: give FF core ownership of haptic state Aldo Ariel Panzardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox