[PATCH]: mtdev could be disabled at configuration

Benjamin Tissoires benjamin.tissoires at gmail.com
Tue Jun 11 00:01:48 PDT 2013


On Mon, Jun 10, 2013 at 8:42 AM, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Fri, 7 Jun 2013 12:11:14 +0200
> Marc Chalain <marc.chalain at gmail.com> wrote:
>
>> mtdev is not necessary on some device (desktop or set-top-box). For
>> embedded solution the minimum of dependencies is required. "configure"
>> accepts the --disable-mtdev option.
>
> Hi Marc,
>
> with this patch, if weston is compiled with --disable-mtdev, it looks
> like it will still happily open multitouch devices, expose them to
> Wayland clients, and feed them garbage or fail or whatever. Right?

Hi Pekka,

no. mtdev is a compatibility layer for converting very rare
touchscreen using the multitouch protocol A into the mostly used
multitouch protocol B.
To my mind, only legacy devices (ntrig 0001 and few others) use the protocol A.
So without mtdev, wayland will open and handle most of the multitouch
screen happily.

>
> I think the proper approach is to change the configure option into
> --disable-multitouch or --disable-touchscreen, which would not only
> drop the dependency to mtdev, but also make Weston ignore all
> touchscreen devices since it will not be able to handle them.

Without mtdev, wayland should only ignore multitouch screen not
presenting the ABS_MT_SLOT axis.
Those relying on SYN_MT_REPORT do not provide tracking (which is done by mtdev).

So my guess is that if you detect multitouch screens by looking at
ABS_MT_SLOT, then everything will be fine whether or not you have
mtdev:
- multitouch B screens will correctly be handled
- multitouch A screens will be processed as a single touch screen,
which is not a problem because the kernel provides single touch
emulation since the early days of multitouch. And if mtdev is present,
then it will show the ABS_MT_SLOT axis, leading to the previous case.

Bonus point, mtdev has not been updated since a long time, and is
missing the bits allowing you to retrieve the initial per-slot states.
And you may find useful to retrieve the current states when weston
launches.

Cheers,
Benjamin


More information about the wayland-devel mailing list