mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: David Herrmann <dh.herrmann@gmail.com>,
	Benjamin Tissoires <benjamin.tissoires@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Markus Trippelsdorf <markus@trippelsdorf.de>,
	Jiri Kosina <jkosina@suse.cz>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	"open list:HID CORE LAYER" <linux-input@vger.kernel.org>
Subject: Re: [GIT] HID for 3.12 merge window
Date: Sat, 07 Sep 2013 10:12:36 -0700	[thread overview]
Message-ID: <131b9a98-59d8-47e8-83df-e59aff14c285@email.android.com> (raw)
In-Reply-To: <CANq1E4ROgWt2oZt9BVgt4uzmHDfTy6DBzTswHvH=ziVRkjfXvg@mail.gmail.com>

David Herrmann <dh.herrmann@gmail.com> wrote:
>Hi
>
>On Sat, Sep 7, 2013 at 11:20 AM, Benjamin Tissoires
><benjamin.tissoires@gmail.com> wrote:
>>
>>
>> On 07/09/13 10:57, David Herrmann wrote:
>>> Hi
>>>
>>> On Sat, Sep 7, 2013 at 10:24 AM, Benjamin Tissoires
>>>> I'm not particularly in favor of adding semantic between ABS_MISC
>and
>>>> ABS_MT_SLOT. We already did that once with the ABS_MT_* stuff, and
>the
>>>> problem comes from devices showing several axes, not really mapped
>>>> (like joysticks). These axes are all mapped to ABS_MISC, but the
>input
>>>> core function map them to ABS_MISC+N. This way some joysticks show
>>>> multitouch axes and are treated as such, whereas the axis are just
>>>> regular absolute axes. (not sure I am clear enough... :( )
>>>>
>>>> Currently, nothing is done in X or in Wayland to detect these false
>>>> multitouch devices with a large number of absolute axes. But if we
>>>> keep a hole between ABS_MISC and ABS_MT_SLOT, we could add an
>>>> heuristic like:
>>>> "if all the axes between ABS_MISC and ABS_MT_SLOT are available,
>then
>>>> ABS_MT_SLOT does not mean multitouch, but ABS_MISC+6."
>>>
>>> So Xorg just took control over the unused ABS_* slots? Hmm, then I
>>> have no other idea than reverting the 3 patches.
>>> Sadly, that also means there's no way for us to easily extend the
>>> ABS_* bits. If someone has an idea, let me know. But for now I'll
>just
>>> put the drums/guitar patches on hold.
>>>
>>
>> Well, I would say the "problem" lies in hid-input.c, line 919:
>>>>>>>>>>>>>>>>>>>>
>>         while (usage->code <= max && test_and_set_bit(usage->code,
>bit))
>>                 usage->code = find_next_zero_bit(bit, max + 1,
>usage->code);
>>>>>>>>>>>>>>>>>>>>
>>
>> So if you try to map several times ABS_MISC or any other axis, then
>you are mapping ABS_MISC+N.
>>
>> Anyway, the only problematic axis is ABS_MISC, as it is a default
>fallback. IMO, we can extend the ABS_* definitions after ABS_MT_TOOL_Y,
>like the original patch you proposed without having to deal with the
>above problem (though this will report the patch series to v3.13).
>> To prevent future mistakes, we should just define ABS_MISC0 (0x29) to
>ABS_MISC5 (0x2e) to fill the hole.
>
>As mentioned earlier in this thread, ABS_* is limited to 0x3f, so we
>have only 2 more free slots after ABS_MT_TOOL_Y.
>We will figure something out for 3.13.
>
>I will also prepare a patch for ABS_MISC0-MISC5.
>

Regardless of whether we settle on using lower bits or bite the bullet and extend number of axis I think it's time for EVIOCGABS2 that would take axis in its argument instead of encoding it in ioctl number - that idea wasn't that good.


Thanks.

-- 
Dmitry

  reply	other threads:[~2013-09-07 17:12 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-06 12:00 Jiri Kosina
2013-09-06 20:20 ` Markus Trippelsdorf
2013-09-06 21:50   ` David Herrmann
2013-09-06 21:59     ` Markus Trippelsdorf
2013-09-06 22:51       ` David Herrmann
2013-09-06 23:10         ` Dmitry Torokhov
2013-09-06 23:57     ` Linus Torvalds
2013-09-07  0:58       ` Dmitry Torokhov
2013-09-07  1:00         ` Linus Torvalds
2013-09-07  3:22           ` Dmitry Torokhov
2013-09-07  7:31             ` David Herrmann
2013-09-07  7:32               ` David Herrmann
2013-09-07  8:24               ` Benjamin Tissoires
2013-09-07  8:57                 ` David Herrmann
     [not found]                   ` <522AEFE9.30402@gmail.com>
2013-09-07  9:29                     ` David Herrmann
2013-09-07 17:12                       ` Dmitry Torokhov [this message]
2013-09-07 16:52               ` Linus Torvalds
2013-09-07 17:31                 ` David Herrmann

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=131b9a98-59d8-47e8-83df-e59aff14c285@email.android.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=benjamin.tissoires@gmail.com \
    --cc=dh.herrmann@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus@trippelsdorf.de \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®