Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Sep 2021 01:03:56 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 89edde19d3fe - stable/13 - psm(4): Disable KVM switch "jitter" clamping for absolute touchpads.
Message-ID:  <202109230103.18N13uI4073836@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=89edde19d3fe13dd6596d9278542d27b42767e26

commit 89edde19d3fe13dd6596d9278542d27b42767e26
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2021-09-09 21:37:40 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-09-23 00:57:08 +0000

    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.
    
    (cherry picked from commit bedf31ad7e15c7d3e3ff9e5295bfd5454fbb42fa)
---
 sys/dev/atkbdc/psm.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/sys/dev/atkbdc/psm.c b/sys/dev/atkbdc/psm.c
index f27a49f82a71..9b47a7a6b0c5 100644
--- a/sys/dev/atkbdc/psm.c
+++ b/sys/dev/atkbdc/psm.c
@@ -3134,8 +3134,12 @@ next:
 		/*
 		 * 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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109230103.18N13uI4073836>