New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 624181 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Jun 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

ChromeOS kernel doesn't support EV_ABS axis resolution for uinput devices

Reported by charliemooney@chromium.org, Jun 28 2016

Issue description

Currently the version of uinput included in the ChromeOS kernel doesn't support setting the resolution for EV_ABS device (like touchpads/touchscreens).  You can set the max/min for a specific axis (like the X position or the pressure value) but you can't specify a resolution.  The resolution is useful because it allows software to know what's happening in real-world units instead of just abstract X and Y coordinates.  For example, our touchpad gesture library requires that we have access to these values.

There is an upstream patch that adds this support:

commit 052876f8e5aec887d22c4d06e54aa5531ffcec75
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date:   Fri Dec 18 17:20:09 2015 -0800

    Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

    This adds two new ioctls, UINPUT_DEV_SETUP and UI_ABS_SETUP, that replaces
    the old device setup method (by write()'ing "struct uinput_user_dev" to the
    node). The old method is not easily extendable and requires huge payloads.
    Furthermore, overloading write() without properly versioned objects is
    error-prone.

    Therefore, we introduce two new ioctls to replace the old method.  These
    ioctls support all features of the old method, plus a "resolution" field
    for absinfo. Furthermore, it's properly forward-compatible to new ABS codes
    and a growing "struct input_absinfo" structure.

    UI_ABS_SETUP also allows user-space to skip unknown axes if not set.  There
    is no need to copy the whole array temporarily into the kernel, but instead
    the caller issues several ioctl where we copy each value manually.

    Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
    Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
    Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

 
Status: Fixed (was: Started)
We shouldn't need this for any legacy systems, so I think just getting this into our 3.18 kernel should be sufficient.
Project Member

Comment 2 by bugdroid1@chromium.org, Jun 30 2016

Labels: merge-merged-chromeos-3.18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/e54d68d5fe6f6b84b1ca2a4e3270a82e5768abeb

commit e54d68d5fe6f6b84b1ca2a4e3270a82e5768abeb
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Sat Dec 19 01:20:09 2015

UPSTREAM: Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

This adds two new ioctls, UINPUT_DEV_SETUP and UI_ABS_SETUP, that replaces
the old device setup method (by write()'ing "struct uinput_user_dev" to the
node). The old method is not easily extendable and requires huge payloads.
Furthermore, overloading write() without properly versioned objects is
error-prone.

Therefore, we introduce two new ioctls to replace the old method.  These
ioctls support all features of the old method, plus a "resolution" field
for absinfo. Furthermore, it's properly forward-compatible to new ABS codes
and a growing "struct input_absinfo" structure.

UI_ABS_SETUP also allows user-space to skip unknown axes if not set.  There
is no need to copy the whole array temporarily into the kernel, but instead
the caller issues several ioctl where we copy each value manually.

Originally-signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Originally-signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Originally-reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Originally-signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 052876f8e5aec887d22c4d06e54aa5531ffcec75)

BUG= chromium:624181 
TEST=Manually built kernel and booted a Reks off it. I then was able to
successfully run a piece of software using the new features that were
added on that Chromebook.

Change-Id: I996d0399ce7e8c86c0ef107b2f97974a44b20334
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356736
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>

[modify] https://crrev.com/e54d68d5fe6f6b84b1ca2a4e3270a82e5768abeb/include/linux/uinput.h
[modify] https://crrev.com/e54d68d5fe6f6b84b1ca2a4e3270a82e5768abeb/drivers/input/misc/uinput.c
[modify] https://crrev.com/e54d68d5fe6f6b84b1ca2a4e3270a82e5768abeb/include/uapi/linux/uinput.h

Labels: VerifyIn-54

Comment 4 by ka...@chromium.org, Sep 2 2016

Labels: Bulk-Verified
Status: Verified (was: Fixed)
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 23 2016

Labels: merge-merged-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/f73e137514f5eeecc49396ef053fd92608c5473c

commit f73e137514f5eeecc49396ef053fd92608c5473c
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Sat Dec 19 01:20:09 2015

UPSTREAM: Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

This adds two new ioctls, UINPUT_DEV_SETUP and UI_ABS_SETUP, that replaces
the old device setup method (by write()'ing "struct uinput_user_dev" to the
node). The old method is not easily extendable and requires huge payloads.
Furthermore, overloading write() without properly versioned objects is
error-prone.

Therefore, we introduce two new ioctls to replace the old method.  These
ioctls support all features of the old method, plus a "resolution" field
for absinfo. Furthermore, it's properly forward-compatible to new ABS codes
and a growing "struct input_absinfo" structure.

UI_ABS_SETUP also allows user-space to skip unknown axes if not set.  There
is no need to copy the whole array temporarily into the kernel, but instead
the caller issues several ioctl where we copy each value manually.

Originally-signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Originally-signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Originally-reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Originally-signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 052876f8e5aec887d22c4d06e54aa5531ffcec75)

BUG= chromium:624181 
TEST=Manually built kernel and booted a Reks off it. I then was able to
successfully run a piece of software using the new features that were
added on that Chromebook.

Change-Id: I996d0399ce7e8c86c0ef107b2f97974a44b20334
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356736
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
(cherry picked from commit e54d68d5fe6f6b84b1ca2a4e3270a82e5768abeb)
Reviewed-on: https://chromium-review.googlesource.com/423255

[modify] https://crrev.com/f73e137514f5eeecc49396ef053fd92608c5473c/include/linux/uinput.h
[modify] https://crrev.com/f73e137514f5eeecc49396ef053fd92608c5473c/drivers/input/misc/uinput.c
[modify] https://crrev.com/f73e137514f5eeecc49396ef053fd92608c5473c/include/uapi/linux/uinput.h

Project Member

Comment 6 by bugdroid1@chromium.org, Mar 21 2017

Labels: merge-merged-factory-glados-7828.B-chromeos-3.18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/b6251da25e1e9060bd808ac074c6adc4374745d9

commit b6251da25e1e9060bd808ac074c6adc4374745d9
Author: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Date: Tue Mar 21 02:45:46 2017

UPSTREAM: Input: uinput - add new UINPUT_DEV_SETUP and UI_ABS_SETUP ioctl

This adds two new ioctls, UINPUT_DEV_SETUP and UI_ABS_SETUP, that replaces
the old device setup method (by write()'ing "struct uinput_user_dev" to the
node). The old method is not easily extendable and requires huge payloads.
Furthermore, overloading write() without properly versioned objects is
error-prone.

Therefore, we introduce two new ioctls to replace the old method.  These
ioctls support all features of the old method, plus a "resolution" field
for absinfo. Furthermore, it's properly forward-compatible to new ABS codes
and a growing "struct input_absinfo" structure.

UI_ABS_SETUP also allows user-space to skip unknown axes if not set.  There
is no need to copy the whole array temporarily into the kernel, but instead
the caller issues several ioctl where we copy each value manually.

Originally-signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Originally-signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Originally-reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Originally-signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
(cherry picked from commit 052876f8e5aec887d22c4d06e54aa5531ffcec75)

BUG= chromium:624181 
TEST=Manually built kernel and booted a Reks off it. I then was able to
successfully run a piece of software using the new features that were
added on that Chromebook.

Change-Id: I996d0399ce7e8c86c0ef107b2f97974a44b20334
Signed-off-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/356736
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>
(cherry picked from commit e54d68d5fe6f6b84b1ca2a4e3270a82e5768abeb)
Reviewed-on: https://chromium-review.googlesource.com/456890
Commit-Queue: Marco Chen <marcochen@chromium.org>
Tested-by: Marco Chen <marcochen@chromium.org>

[modify] https://crrev.com/b6251da25e1e9060bd808ac074c6adc4374745d9/include/linux/uinput.h
[modify] https://crrev.com/b6251da25e1e9060bd808ac074c6adc4374745d9/drivers/input/misc/uinput.c
[modify] https://crrev.com/b6251da25e1e9060bd808ac074c6adc4374745d9/include/uapi/linux/uinput.h

Sign in to add a comment