Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jan 2024 17:09:52 GMT
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: d6e6c02c29b1 - stable/13 - iichid(4): Restore/increase sampling rate
Message-ID:  <202401191709.40JH9qZB079666@gitrepo.freebsd.org>

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

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

commit d6e6c02c29b1e29d9671938ac327453ed1ff2bf0
Author:     Alexander Motin <mav@FreeBSD.org>
AuthorDate: 2023-12-24 00:10:49 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2024-01-19 17:08:13 +0000

    iichid(4): Restore/increase sampling rate
    
    My previous commit by reducing precision reduced the sampling rate
    from 60Hz to 40Hz on idle system.  Return it back to 60-80Hz range,
    that should be good for mouse smoothness on 60Hz displays.
    
    MFC after:      1 months
    
    (cherry picked from commit 68e457df0268113646264883515412af4c8808cb)
---
 sys/dev/iicbus/iichid.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sys/dev/iicbus/iichid.c b/sys/dev/iicbus/iichid.c
index d2359fdf5b20..99ec402c3590 100644
--- a/sys/dev/iicbus/iichid.c
+++ b/sys/dev/iicbus/iichid.c
@@ -106,9 +106,9 @@ enum {
  * sampling_rate_fast value too high as it may result in periodical lags of
  * cursor motion.
  */
-#define	IICHID_SAMPLING_RATE_FAST	60
+#define	IICHID_SAMPLING_RATE_FAST	80
 #define	IICHID_SAMPLING_RATE_SLOW	10
-#define	IICHID_SAMPLING_HYSTERESIS	12	/* ~ 2x fast / slow */
+#define	IICHID_SAMPLING_HYSTERESIS	16	/* ~ 2x fast / slow */
 
 /* 5.1.1 - HID Descriptor Format */
 struct i2c_hid_desc {
@@ -567,7 +567,7 @@ rearm:
 		else
 			rate = sc->sampling_rate_fast;
 		taskqueue_enqueue_timeout_sbt(sc->taskqueue, &sc->periodic_task,
-		    SBT_1S / MAX(rate, 1), 0, C_PREL(1));
+		    SBT_1S / MAX(rate, 1), 0, C_PREL(2));
 	}
 out:
 	if (bus_requested)



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