All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrik Rydberg <rydberg@euromail.se>
To: Michael Poole <mdpoole@troilus.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: mt: introduce MT event slots
Date: Thu, 08 Apr 2010 15:01:37 +0200	[thread overview]
Message-ID: <4BBDD3B1.6030808@euromail.se> (raw)
In-Reply-To: <87mxxei33o.fsf@troilus.org>

Michael Poole wrote:
[...]
> 
> For hardware with touch tracking support, what does a slot ID provide
> for user-space that the tracking ID doesn't?  (TRACKING_ID is already
> supposed to be unique for the life of the touch.)

The purpose of the slot is twofold. Firstly, it reintroduces the ability for the
kernel to filter ABS_MT events, which reduces the number of events emitted from
the input core by a large factor. Secondly, it allows the driver to send partial
information without breaking the protocol.

The current MT protocol is designed for anonymous contacts, which dictates that
all data for all fingers has to be sent between every synchronization point.
Although this is fine for a handful of fingers, it does not play well with a
larger scenario. The slot concept allows for a minimum of information to be
emitted from the input core, without breaking compatibility with the current MT
protocol. If a single attribute of a single finger of a single user is changed,
the event sequence will simply be:

SYN_MT_SLOT <slot-in-use>
ABS_MT_ATTRIBUTE <some-value>

If the contact gets destroyed and replaced by another one, there is not even a
need to send that information explicitly, but this sequence would suffice:

SYN_MT_SLOT <slot-in-use>
ABS_MT_USER_ID <replacing-user>
ABS_MT_TRACKING_ID <replacing-tracking-id>
ABS_MT_ATTRIBUTE1 <some-value>
ABS_MT_ATTRIBUTE2 <some-value>
...


One might argue that a similar sequence could be implemented within the existing
 MT protocol. However, it would at least require a different semantic usage of
the SYN_MT_REPORT event, without the ability to detect what semantics to use.
Besides, a larger amount of events would be needed than with the proposed slot
concept.

> For hardware without
> touch tracking, is the driver expected to implement the Euclidean
> bipartite matching in order to assign touch reports to slots?

This is a possible scenario, yes. The driver would of course use a common kernel
library for the matching task. Whether or not this will happen depends somewhat
on how well userspace works with the current MT protocol.

> 
> (Pardon me if I'm being dense -- I'm more familiar with the kernel
> driver side, not the X server's implementation or dispatch of multitouch
> events.)

Thank you for your questions, the discussion is very much appreciated.

Cheers,
Henrik


  reply	other threads:[~2010-04-08 13:04 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08  0:13 [PATCH] input: mt: introduce MT event slots Henrik Rydberg
2010-04-08  3:07 ` Michael Poole
2010-04-08  9:43   ` Henrik Rydberg
2010-04-08 11:40     ` Michael Poole
2010-04-08 13:01       ` Henrik Rydberg [this message]
2010-04-16  7:40         ` Hennerich, Michael
2010-04-16 14:29           ` Henrik Rydberg
2010-04-08 19:15     ` Rafi Rubin
2010-04-08 20:25       ` Henrik Rydberg
2010-04-08 21:23         ` Rafi Rubin
2010-04-08 22:12           ` Henrik Rydberg
2010-04-15 23:25 ` Dmitry Torokhov
2010-04-16 15:09   ` Henrik Rydberg
2010-05-04  7:57   ` Henrik Rydberg
2010-05-04 17:29     ` Dmitry Torokhov
2010-05-04 21:41       ` Henrik Rydberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4BBDD3B1.6030808@euromail.se \
    --to=rydberg@euromail.se \
    --cc=akpm@linux-foundation.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdpoole@troilus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.