Bug 54428 - Multitouch touch screen is detected as a pointer device by evdev_configure_device()
Summary: Multitouch touch screen is detected as a pointer device by evdev_configure_de...
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: weston (show other bugs)
Version: unspecified
Hardware: ARM Linux (All)
: medium normal
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-03 09:59 UTC by Abhijit Potnis
Modified: 2013-08-08 20:56 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
evtest run dump. (48.95 KB, text/plain)
2012-09-03 09:59 UTC, Abhijit Potnis
Details

Description Abhijit Potnis 2012-09-03 09:59:54 UTC
Created attachment 66535 [details]
evtest run dump.

Hello,

I use a eGalax Multitouch Screen. When running weston, the screen is detected as a pointer device. The ABS_MT event packets are hence ignored as evdev_process_absolute_motion() as it only listens to ABS_ event packets. When eGalax is forcefully set to be a MT touch device by overriding the "if" loop in evdev.c (ref, below), the touch works fine. In my case that ABS_MT_SLOT is not set, is that a device driver issue ? or are we doing something different in evdev.c ?
Should we be checking for SYN_MT_REPORT bit for devices handling anonymous contacts and not just ABS_MT_SLOT?

static int
evdev_configure_device(struct evdev_device *device){
...

if (TEST_BIT(abs_bits, ABS_MT_SLOT)) {
..
}



wayland: commit c855d6eec4c5e63489da5bc08451a2376e6d2aea
weston : commit 5418a904ca007a109f6af8c0c75ca97a134986d9

Weston Log

[01:04:32.578] input device eGalax Touch Screen, /dev/input/event1 is a pointer
[01:04:32.578] Creating evdev device on '/dev/input/event1'.

Attached along is the evtest dump for eGalax touch screen
Comment 1 Pekka Paalanen 2012-09-06 09:05:37 UTC
Thanks for the report. Yeah, evdev support is lacking a lot, so I guess we will address this problem when we do a bigger overhaul(?). I bet there are many heuristics we should copy from xf86-input-evdev, especially on detecting devices.
Comment 2 Kristian Høgsberg 2013-08-08 20:56:30 UTC
commit 45d659dd820dc1fd9baee91fdfaba01966ddfd75
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Aug 8 12:03:08 2013 +1000

    evdev: check for ABS_MT_POSITION_X/Y to determine mt devices
    
    mtdev as currently used in weston is a noop. mtdev's purpose is to convert
    Protocol A devices (without ABS_MT_SLOT) to Protocol B devices (slots).
    For Protocol B devices mtdev merely routes the events, so checking for
    slots and then using mtdev based on that adds no functionality.
    
    Check for ABS_MT_POSITION_X/Y instead and use that to categorise a device
    as MT device. mtdev will provide us with a slotted protocol for all devices.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=54428


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.