Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 5 Feb 2021 10:19:15 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: 4932ef733d23 - stable/12 - ukbd(4): Do not serialize evdev key events
Message-ID:  <202102051019.115AJFUd029924@gitrepo.freebsd.org>

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

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

commit 4932ef733d2336a7f76b753824091be6f9f1197a
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2020-12-24 18:56:33 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-02-05 10:17:41 +0000

    ukbd(4): Do not serialize evdev key events
    
    Unlike AT keyboards, HID devices are able to send all pc105 key
    states within a single report. Let evdev to transmit all key state
    changes within a single report too.
    
    Reviewed by:    hselasky
    Obtained from:  sysutils/iichid
    MFC after:      1 month
    Differential Revision:  https://reviews.freebsd.org/D27749
    
    (cherry picked from commit 769935a4edf8a75805000900d44a66ad5d2eaabe)
---
 sys/dev/usb/input/ukbd.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c
index e058a55cc661..cf1c11069ffc 100644
--- a/sys/dev/usb/input/ukbd.c
+++ b/sys/dev/usb/input/ukbd.c
@@ -389,11 +389,9 @@ ukbd_put_key(struct ukbd_softc *sc, uint32_t key)
 	    (key & KEY_RELEASE) ? "released" : "pressed");
 
 #ifdef EVDEV_SUPPORT
-	if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL) {
+	if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL)
 		evdev_push_event(sc->sc_evdev, EV_KEY,
 		    evdev_hid2key(KEY_INDEX(key)), !(key & KEY_RELEASE));
-		evdev_sync(sc->sc_evdev);
-	}
 #endif
 
 	if (sc->sc_inputs < UKBD_IN_BUF_SIZE) {
@@ -560,6 +558,11 @@ ukbd_interrupt(struct ukbd_softc *sc)
 		}
 	}
 
+#ifdef EVDEV_SUPPORT
+	if (evdev_rcpt_mask & EVDEV_RCPT_HW_KBD && sc->sc_evdev != NULL)
+		evdev_sync(sc->sc_evdev);
+#endif
+
 	/* wakeup keyboard system */
 	ukbd_event_keyinput(sc);
 }



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