lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 10 Jun 2010 18:28:32 +0200
From:	Henrik Rydberg <rydberg@...omail.se>
To:	Pavel Machek <pavel@....cz>
CC:	Dmitry Torokhov <dmitry.torokhov@...il.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
	Mika Kuoppala <mika.kuoppala@...ia.com>,
	Peter Hutterer <peter.hutterer@...-t.net>,
	Benjamin Tissoires <tissoire@...a.fr>,
	Stephane Chatty <chatty@...c.fr>,
	Rafi Rubin <rafi@...s.upenn.edu>,
	Michael Poole <mdpoole@...ilus.org>
Subject: Re: [PATCH 2/2] input: mt: Document the MT event slot protocol (rev4)

Pavel Machek wrote:
> Hi!
> 
>> +Protocol Example A
>> +------------------
>> +
>> +Here is what a minimal event sequence for a two-contact touch would look
>> +like for a type A device:
>> +
>> +   ABS_MT_POSITION_X x[0]
>> +   ABS_MT_POSITION_Y y[0]
>> +   SYN_MT_REPORT
>> +   ABS_MT_POSITION_X x[1]
>> +   ABS_MT_POSITION_Y y[1]
>> +   SYN_MT_REPORT
>> +   SYN_REPORT
> ...
>> -Usage
>> ------
>> +Here is the sequence after lifting the first contact:
>> +
>> +   ABS_MT_POSITION_X x[1]
>> +   ABS_MT_POSITION_Y y[1]
>> +   SYN_MT_REPORT
>> +   SYN_REPORT
> 
> ...
> 
>> +Protocol Example B
>> +------------------
>> +
>> +Here is what a minimal event sequence for a two-contact touch would look
>> +like for a type B device:
>> +
>> +   ABS_MT_SLOT 0
>> +   ABS_MT_TRACKING_ID 45
>> +   ABS_MT_POSITION_X x[0]
>> +   ABS_MT_POSITION_Y y[0]
>> +   ABS_MT_SLOT 1
>> +   ABS_MT_TRACKING_ID 46
>> +   ABS_MT_POSITION_X x[1]
>> +   ABS_MT_POSITION_Y y[1]
>> +   SYN_REPORT
>> +
>> +Here is the sequence after moving contact 45 in the x direction:
>> +
>> +   ABS_MT_SLOT 0
>> +   ABS_MT_POSITION_X x[0]
>> +   SYN_REPORT
> 
> With this proposed system, protocol A is *very* different from
> protocol B. Is there way to make them more similar?

Hello,

unfortunately, the two protocols are different for a reason. Given the point of
the type B protocol, to reduce bandwidth and accommodate filtering in the input
core, the major difference is that type A receivers always expect all data
between synchronizations, whereas type B devices never send all data. This alone
means a receiver wishing to support both type of streams will need to know what
type of stream to expect. This is accomplished by the presence of ABS_MT_SLOT.
Secondly, in order to not break the established semantics of events, ABS_MT_SLOT
is used instead SYN_MT_REPORT. This also makes type B devices in type A
applications stop working in a somewhat graceful fashion.

The usage of SYN_MT_REPORT versus ABS_MT_SLOT is the only syntactic difference
between the protocols, and it stems from the different interpretation of what
comes through the wire. IMHO, it means the way the type B protocol is formulated
is the smallest possible change that accommodates the required effect.

Thanks,
Henrik

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ