psm(4): Disable KVM switch "jitter" clamping for absolute touchpads.

r123442 introduced solution for clamping of PS/2 mice jitter when using
a KVM. Solution is to buffer mouse packets for 0.050ms if mouse activity
has not been seen for more than 0.5 seconds. Then flush that data to driver
if no validation errors found or drop the entire queue otherwise.

While it works well with relative devices it has issues with absolute ones
Depending on history buffering may results in delaying of the touch front
edge for 0.050ms that affects gesture processing (tap detection).

As absolute touchpads usually are built-in devices we can safely disable
bufferization and KVM jitter clamping to avoid such a delays.

MFC after:	2 weeks
This commit is contained in:
Vladimir Kondratyev 2021-09-10 00:37:40 +03:00
parent 9d3bc16382
commit bedf31ad7e

View File

@ -3134,8 +3134,12 @@ psmintr(void *arg)
/*
* If we've filled the queue then call the softintr ourselves,
* otherwise schedule the interrupt for later.
* Do not postpone interrupts for absolute devices as it
* affects tap detection timings.
*/
if (!timeelapsed(&sc->lastsoftintr, psmsecs, psmusecs, &now) ||
if (sc->hw.model == MOUSE_MODEL_SYNAPTICS ||
sc->hw.model == MOUSE_MODEL_ELANTECH ||
!timeelapsed(&sc->lastsoftintr, psmsecs, psmusecs, &now) ||
(sc->pqueue_end == sc->pqueue_start)) {
if ((sc->state & PSM_SOFTARMED) != 0) {
sc->state &= ~PSM_SOFTARMED;