ChromeOS kernel doesn't support EV_ABS axis resolution for uinput devices
Reported by
charliemooney@chromium.org,
Jun 28 2016
|
||||||
Issue descriptionCurrently 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>
,
Jun 30 2016
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
,
Aug 29 2016
,
Sep 2 2016
,
Dec 23 2016
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
,
Mar 21 2017
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 |
||||||
Comment 1 by charliemooney@chromium.org
, Jun 30 2016