x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling [chromiumos/overlays/chromiumos-overlay : master]

21 views
Skip to first unread message

Chung-yih Wang (Code Review)

unread,
Oct 30, 2012, 12:23:49 PM10/30/12
to
Chung-yih Wang has uploaded a new change for review.

Change subject: x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling
......................................................................

x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling

If an evdev client can not consume evdev events in its queue fast enough, the
evdev kernel driver will fill an SYN_DROPPED event and clear the queue
once the client's queue is full. Then the queue will be out of sync with
evdev's state. The patch tries to handle the SYN_DROPPED event by retrieving
evdev's state with specific ioctl commands in order to make the state of evdev
consistent between kernel and user-space evdev driver.

BUG=chromium-os:35291
TEST=on device; run the platform_TouchscreenSynDrop test
1. Modify the line in /sbin/xstart.sh to change the nice level from -20 to 19.

exec nice -n 19 /usr/bin/X -noreset -nolisten tcp vt01 -auth $1 2> /dev/null

2. Execute the test script to genereate the SYN_DROPPED event and see if it passes the test.
cd /usr/local/autotest
bin/autotest tests/platform_TouchscreenSynDrop/control

3. Test if touchscreen still functions correctly.

Change-Id: Ia5b2eda0438152ead497e8c4f0053cd5a1f6a40c
---
A x11-drivers/xf86-input-evdev/files/evdev-2.7.3-Add-SYN_DROPPED-handling.patch
R x11-drivers/xf86-input-evdev/xf86-input-evdev-2.7.3-r7.ebuild
M x11-drivers/xf86-input-evdev/xf86-input-evdev-2.7.3.ebuild
3 files changed, 322 insertions(+), 0 deletions(-)


git pull ssh://gerrit.chromium.org:29418/chromiumos/overlays/chromiumos-overlay refs/changes/06/36906/1
--
To view, visit https://gerrit.chromium.org/gerrit/36906
To unsubscribe, visit https://gerrit.chromium.org/gerrit/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5b2eda0438152ead497e8c4f0053cd5a1f6a40c
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Chung-yih Wang <cyw...@chromium.org>

Andrew de los Reyes (Code Review)

unread,
Oct 30, 2012, 2:09:17 PM10/30/12
to Chung-yih Wang, Gerrit, Daniel Kurtz
Andrew de los Reyes has posted comments on this change.

Change subject: x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling
......................................................................


Patch Set 1: (2 inline comments)

two questions:

- can we get this upstream after it goes in here?

- when using our evdev logging (from .../third_party/chromiumos-overlay/x11-drivers/xf86-input-evdev/files/evdev-2.7.0-feedback-log.patch), do we still get the SYN_DROPPED message in the log? It would be good to make sure the log matches exactly what we get from the kernel.

....................................................
File x11-drivers/xf86-input-evdev/files/evdev-2.7.3-Add-SYN_DROPPED-handling.patch
Line 110: +EvdevGetTime(struct timeval *t, BOOL use_monotonic) {
avoid 1 char var names

Line 271: + pEvdev->is_monotonic = (EvdevEnableMonotonic(pInfo) == Success);
is this an unrelated change?
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5b2eda0438152ead497e8c4f0053cd5a1f6a40c
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Chung-yih Wang <cyw...@chromium.org>
Gerrit-Reviewer: Andrew de los Reyes <ad...@chromium.org>
Gerrit-Reviewer: Daniel Kurtz <djk...@chromium.org>
Gerrit-Reviewer: Gerrit <chrom...@google.com>

Chung-yih Wang (Code Review)

unread,
Oct 30, 2012, 11:57:31 PM10/30/12
to Gerrit, Daniel Kurtz, Andrew de los Reyes
Chung-yih Wang has posted comments on this change.

Change subject: x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling
......................................................................


Patch Set 1: (2 inline comments)

....................................................
File x11-drivers/xf86-input-evdev/files/evdev-2.7.3-Add-SYN_DROPPED-handling.patch
Line 110: +EvdevGetTime(struct timeval *t, BOOL use_monotonic) {
Done

Line 271: + pEvdev->is_monotonic = (EvdevEnableMonotonic(pInfo) == Success);
Removed. Good catch, it is already done with another patch.
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5b2eda0438152ead497e8c4f0053cd5a1f6a40c
Gerrit-PatchSet: 1
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Chung-yih Wang <cyw...@chromium.org>
Gerrit-Reviewer: Andrew de los Reyes <ad...@chromium.org>
Gerrit-Reviewer: Chung-yih Wang <cyw...@chromium.org>

Chung-yih Wang (Code Review)

unread,
Oct 31, 2012, 1:38:39 AM10/31/12
to Gerrit, Daniel Kurtz, Andrew de los Reyes
Chung-yih Wang has posted comments on this change.

Change subject: x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling
......................................................................


Patch Set 2:

* can we get this upstream after it goes in here?
=> Yes, but we also need to upstream the 'Use monotonic clock' patch as well.

* when using our evdev logging (from .../third_party/chromiumos-overlay/x11-drivers/xf86-input-evdev/files/evdev-2.7.0-feedback-log.patch), do we still get the SYN_DROPPED message in the log? It would be good to make sure the log matches exactly what we get from the kernel.

=> Yes, we will get the SYN_DROPPED message in the log. But this will be a slightly different from what we read from kernel after SYN_DROPPED is received as we need to make the state consistent, so we will drain the queue until the state sync is atomic.
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5b2eda0438152ead497e8c4f0053cd5a1f6a40c
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Chung-yih Wang <cyw...@chromium.org>

Andrew de los Reyes (Code Review)

unread,
Oct 31, 2012, 11:47:37 AM10/31/12
to Chung-yih Wang, Gerrit, Daniel Kurtz
Andrew de los Reyes has posted comments on this change.

Change subject: x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling
......................................................................


Patch Set 2: Looks good to me, approved
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5b2eda0438152ead497e8c4f0053cd5a1f6a40c
Gerrit-PatchSet: 2
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Chung-yih Wang <cyw...@chromium.org>

Chung-yih Wang (Code Review)

unread,
Oct 31, 2012, 11:59:44 PM10/31/12
to Gerrit, Daniel Kurtz, Andrew de los Reyes
Chung-yih Wang has posted comments on this change.

Change subject: x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling
......................................................................


Patch Set 3: Verified; Looks good to me, approved; Ready

Carry over adlr's approval, add one missing step in test description.
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5b2eda0438152ead497e8c4f0053cd5a1f6a40c
Gerrit-PatchSet: 3
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Chung-yih Wang <cyw...@chromium.org>

Daniel Kurtz (Code Review)

unread,
Nov 5, 2012, 4:31:40 AM11/5/12
to Chung-yih Wang, Gerrit, Andrew de los Reyes
Daniel Kurtz has posted comments on this change.

Change subject: x11-drivers/xf86-input-evdev: Add SYN_DROPPED handling
......................................................................


Patch Set 4: (1 inline comment)

....................................................
File x11-drivers/xf86-input-evdev/files/evdev-2.7.3-Add-SYN_DROPPED-handling.patch
Line 217: + if (EvdevProbeAbsinfo(pInfo, ABS_MT_SLOT) == Success)
Only do this if device actually has ABS_MT_SLOT. Something like:

if (TestBit(ABS_MT_SLOT, device->abs_bitmask))
...
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia5b2eda0438152ead497e8c4f0053cd5a1f6a40c
Gerrit-PatchSet: 4
Gerrit-Project: chromiumos/overlays/chromiumos-overlay
Gerrit-Branch: master
Gerrit-Owner: Chung-yih Wang <cyw...@chromium.org>
Reply all
Reply to author
Forward
0 new messages