Skip to content

Conversation

@JamesH65
Copy link
Contributor

Touchscreen driver was not checking event type,
which meant bad coords that arrived with the
finger up event were being used, causing this
spurious coordinate event.

Fix is to ignore all finger up events.

Copy link
Contributor

@pelwell pelwell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks fine apart from the formatting issue, and the lack of "Signed-off-by:".

input_mt_slot(ts->input_dev, touchid);
input_mt_report_slot_state(ts->input_dev, MT_TOOL_FINGER, 1);
if (event_id == FTS_TOUCH_CONTACT || event_id == FTS_TOUCH_DOWN)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This brace belongs on the previous line. If it doesn't fit, split the predicate after the ||.

{
int x = (((int) regs.point[i].xh & 0xf) << 8) + regs.point[i].xl;
int y = (((int) regs.point[i].yh & 0xf) << 8) + regs.point[i].yl;
int touchid = (regs.point[i].yh >> 4) & 0xf;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this value going to be correct? Looks like you've got 2 bits for touchid and 2 bits for touch number... But this is supposed to be a five touch device, in fact I believe the old one was 10 point...

@JamesH65
Copy link
Contributor Author

JamesH65 commented Sep 22, 2017 via email

Touchscreen driver was not checking event type,
which meant bad coords that arrived with the
finger up event were being used, causing this
spurious coordinate event.

Fix is to ignore all finger up events.

Signed-off-by: James Hughes <james.hughes@raspberrypi.org>
@popcornmix popcornmix merged commit 99ba5ff into raspberrypi:rpi-4.9.y Sep 22, 2017
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Sep 22, 2017
kernel: Touchscreen spurious event fix
See: raspberrypi/linux#2207

firmware: tvservice: Avoid unmatched reference counting on attach/unplugged events
See: #875
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Sep 22, 2017
kernel: Touchscreen spurious event fix
See: raspberrypi/linux#2207

firmware: tvservice: Avoid unmatched reference counting on attach/unplugged events
See: raspberrypi/firmware#875
@JamesH65
Copy link
Contributor Author

JamesH65 commented Sep 22, 2017 via email

popcornmix added a commit to raspberrypi/firmware that referenced this pull request Sep 24, 2017
kernel: Touchscreen spurious event fix
See: raspberrypi/linux#2207

firmware: tvservice: Avoid unmatched reference counting on attach/unplugged events
See: #875
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Sep 24, 2017
kernel: Touchscreen spurious event fix
See: raspberrypi/linux#2207

firmware: tvservice: Avoid unmatched reference counting on attach/unplugged events
See: raspberrypi/firmware#875
@JamesH65 JamesH65 deleted the TouchscreenFix branch September 14, 2018 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants