linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Peter Hutterer <peter.hutterer@who-t.net>
Cc: David Herrmann <dh.herrmann@gmail.com>,
	linux-input@vger.kernel.org, Henrik Rydberg <rydberg@euromail.se>,
	Benjamin Tissoires <benjamin.tissoires@gmail.com>,
	Jiri Kosina <jkosina@suse.cz>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC] Input: introduce ABS_MAX2/CNT2 and friends
Date: Sun, 6 Oct 2013 00:47:00 -0700	[thread overview]
Message-ID: <20131006074700.GA19155@core.coreip.homeip.net> (raw)
In-Reply-To: <20131003233223.GA21255@yabbi.bne.redhat.com>

On Fri, Oct 04, 2013 at 09:32:23AM +1000, Peter Hutterer wrote:
> On Thu, Oct 03, 2013 at 12:10:36AM +0200, David Herrmann wrote:
> > As we painfully noticed during the 3.12 merge-window our
> > EVIOCGABS/EVIOCSABS API is limited to ABS_MAX<=0x3f. We tried several
> > hacks to work around it but if we ever decide to increase ABS_MAX, the
> > EVIOCSABS ioctl ABI might overflow into the next byte causing horrible
> > misinterpretations in the kernel that we cannot catch.
> > 
> > Therefore, we decided to go with ABS_MAX2/CNT2 and introduce two new
> > ioctls to get/set abs-params. They no longer encode the ABS code in the
> > ioctl number and thus allow up to 4 billion ABS codes.
> > 
> > Unfortunately, the uinput API also hard-coded the ABS_CNT value in its
> > ABI. To avoid any hacks in uinput, we simply introduce a new
> > uinput_user_dev2 to replace the old one. The new API allows growing
> > ABS_CNT2 values without any API changes.
> > 
> > Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
> > ---
> > Hi
> > 
> > This is only compile-tested but I wanted to get a first revision out to let
> > people know what we're working on. Unfortunately, the ABS API has this horribly
> > low ABS_MAX limit and we couldn't figure out a way to increase it while keeping
> > ABI compatibility.
> > 
> > Any feedback and review is welcome. And if anyone spots ABI breakage by this
> > patch, please let me know. If nothing comes up I will patch libevdev to use the
> > new API, write some extensive test-cases and push this forward.
> > 
> > As a sidenote: I didn't modify joydev to use the new values. Fortunately, the
> > joydev API would allow switching to ABS_CNT2 without breaking API, but it would
> > limit the new ABS_CNT2 to 16k. This is quite high but nothing compared to the
> >  2^32 that we can theoretically support now. If you think 16k ought to be enough
> > (probably?) I can adjust the joydev API, too.
> > All other kernel users were converted to the new values. Nothing left behind..
> 
> 
> just a comment from skimming the patch:
> if you need a new uinput abi anyway, can we add the resolution here? it's
> sorely needed for some tests. see also the patch Benjamin sent a while ago
> ("input/uinput: support abs resolution", July 15 2013)

Indeed. Also, while we are at it, would it make sense to allow
requesting a range of ABS infos at once?

-- 
Dmitry

  reply	other threads:[~2013-10-06  7:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-02 22:10 [RFC] Input: introduce ABS_MAX2/CNT2 and friends David Herrmann
2013-10-03 23:32 ` Peter Hutterer
2013-10-06  7:47   ` Dmitry Torokhov [this message]
2013-10-06 23:19     ` Peter Hutterer
2013-10-07  0:04       ` Dmitry Torokhov
2013-10-07  1:30         ` Peter Hutterer
2013-10-07 10:58           ` 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=20131006074700.GA19155@core.coreip.homeip.net \
    --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=peter.hutterer@who-t.net \
    --cc=rydberg@euromail.se \
    /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;
as well as URLs for NNTP newsgroup(s).