Re: [PATCH v2] Input: evdev - Add EVIOC mechanism to extract theMT slot state

From: Chase Douglas
Date: Fri Jan 06 2012 - 11:24:01 EST


On 01/06/2012 07:16 AM, Henrik Rydberg wrote:
> This patch adds the ability to extract the MT slot state sequentially
> via EVIOCGABS. The slot parameter is first selected by calling
> EVIOCSABS with ABS_MT_SLOT as argument, followed by a set of EVIOCGABS
> calls. The slot selection is local to the evdev client handler, and
> does not affect the actual input state.
>
> Cc: Chase Douglas <chase.douglas@xxxxxxxxxxxxx>
> Signed-off-by: Henrik Rydberg <rydberg@xxxxxxxxxxx>
> ---
> Hi Dmitry,
>
> the first version of this patch was sent a long time ago (May 2010),
> but was put on hold due to a lack of usecases. Now, it seems such a
> case has arrived, in the X server (evdev). Some MT events may be much
> less frequent than others (ABS_MT_ORIENTATION, for example), resulting
> in wrong touch values being assumed after, say, an X restart.
>
> I am not 100% in favor of this patch myself. Perhaps there should be a
> more explicit mechanism for selecting slots, for instance.
>
> The patch has been tested against both 3.2 and 3.1 stable.

To bolster the claim, I have been working on the X multitouch
implementation and a library on top of it, utouch-frame. I wrote a test
case that expects the proper sequence and values of events that
propagate from the kernel to the X input module, through utouch-frame.
It was during this testing that I noticed issues that could occur if we
don't know the current values of axes in each slot.

This patch does what is says, so I'm happy to review it positively
as-is. It doesn't require a new ioctl, which is a good thing :).

Reviewed-by: Chase Douglas <chase.douglas@xxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/