From: Benjamin Tissoires <benjamin.tissoires@redhat.com>
To: "Jiri Kosina" <jikos@kernel.org>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Jonathan Corbet" <corbet@lwn.net>,
"Ahelenia Ziemiańska" <nabijaczleweli@nabijaczleweli.xyz>,
"Ping Cheng" <pinglinux@gmail.com>,
"Aaron Armstrong Skomra" <skomra@gmail.com>,
"Jason Gerecke" <killertofu@gmail.com>,
"Peter Hutterer" <peter.hutterer@who-t.net>
Cc: linux-input@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
Benjamin Tissoires <benjamin.tissoires@redhat.com>
Subject: [PATCH 00/12] HID: fix for generic input processing
Date: Wed, 26 Jan 2022 17:18:20 +0100 [thread overview]
Message-ID: <20220126161832.3193805-1-benjamin.tissoires@redhat.com> (raw)
Hi,
This is a followup of the discussion we had between Wacom and
the maintainers, and a followup of those 2 patch series:
https://lore.kernel.org/r/20211022232837.18988-1-ping.cheng@wacom.com/
https://lore.kernel.org/r/2ca91ac7cf92e3048a236db3cd519f04e12c1e61.1615224800.git.nabijaczleweli@nabijaczleweli.xyz/
It took me a while to get it right, but I finally can submit the
series:
- the first 8 patches are some cleanup in the hid-input.c and
hid-core.c code. They also create a list of input fields that
is then used to process the event, in the priority we think
is good.
For instance, on multitouch devices, it is better to have
Contact Count before processing all touches, and in each
touch, having Contact ID first is better. This series doesn't
cover hid-multitouch, but I have a series on top of this one that
does cover it.
Anyway, in our case, here, we need to process Invert before
In Range for tablets so we can make a decision whether the user
has the intend to erase or not.
- patch 9 enforces the invert usage before In Range as mentioned
above
- patch 10 is the actual bulk of processing that should fix the
generic tablet handling. Now that we have a reliable ordering
of the fields, we can compute the state of the tool in a reliable
way, and be kinder to userspace by not sending to it 2 tools at
the same time.
This patch has been extensively tested by hid-tools with the new
MR I submitted that add tests for tablets [0].
- patch 11 is a nice to have that I need for my second series regarding
hid-multitouch. It is not mandatory with that series, but given
that it changes the format of the priorities in hid-input.c I thought
it would be best to send it as part of this series.
Note that now we are tagging the *reports* and the individual fields
when they are part of a multitouch collection, which should help
the drivers that implement this processing (hid-multitouch and wacom).
- last, patch 12 is an attempt at fixing the documentation regarding
BTN_TOOL_* (requested by Peter).
Dmitry, feel free to take this one through your tree if you prefer
to do so (and if you are happy with it), otherwise we can take it
through the hid tree.
As mentioned above, I have a followup series not entirely tidied up
that implements the processing of Win8 mutltiouch devices in
hid-input.c.
There are several benefits for that: we should be able to drop the
multitouch code in wacom.ko, we can simplify part of hid-multitouch,
and we will be able to quirk a particular device in a separate module,
without touching at the generic code (in hid-multitouch or hid-input).
Anyway, I am missing a few bits for that so that's coming in later.
Cheers,
Benjamin
[0] https://gitlab.freedesktop.org/libevdev/hid-tools/-/merge_requests/127
Benjamin Tissoires (12):
HID: core: statically allocate read buffers
HID: core: de-duplicate some code in hid_input_field()
HID: core: split data fetching from processing in hid_input_field()
HID: input: tag touchscreens as such if the physical is not there
HID: input: rework spaghetti code with switch statements
HID: input: move up out-of-range processing of input values
HID: compute an ordered list of input fields to process
HID: core: for input reports, process the usages by priority list
HID: input: enforce Invert usage to be processed before InRange
HID: input: remove the need for HID_QUIRK_INVERT
HID: input: accommodate priorities for slotted devices
Input: docs: add more details on the use of BTN_TOOL
Documentation/input/event-codes.rst | 5 +-
drivers/hid/hid-core.c | 280 ++++++++++++++++++++---
drivers/hid/hid-input.c | 330 ++++++++++++++++++++++------
include/linux/hid.h | 23 +-
4 files changed, 533 insertions(+), 105 deletions(-)
--
2.33.1
next reply other threads:[~2022-01-26 16:18 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 16:18 Benjamin Tissoires [this message]
2022-01-26 16:18 ` [PATCH 01/12] HID: core: statically allocate read buffers Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 02/12] HID: core: de-duplicate some code in hid_input_field() Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 03/12] HID: core: split data fetching from processing " Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 04/12] HID: input: tag touchscreens as such if the physical is not there Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 05/12] HID: input: rework spaghetti code with switch statements Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 06/12] HID: input: move up out-of-range processing of input values Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 07/12] HID: compute an ordered list of input fields to process Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 08/12] HID: core: for input reports, process the usages by priority list Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 09/12] HID: input: enforce Invert usage to be processed before InRange Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 10/12] HID: input: remove the need for HID_QUIRK_INVERT Benjamin Tissoires
[not found] ` <CAF8JNhLCXT7N4DubYYT12eMphDH-6U69ci7zFisJfZwsviJGkQ@mail.gmail.com>
2022-02-02 9:54 ` Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 11/12] HID: input: accommodate priorities for slotted devices Benjamin Tissoires
2022-01-26 16:18 ` [PATCH 12/12] Input: docs: add more details on the use of BTN_TOOL Benjamin Tissoires
2022-02-09 6:22 ` Peter Hutterer
2022-02-14 10:48 ` Benjamin Tissoires
2022-02-08 19:19 ` [PATCH 00/12] HID: fix for generic input processing Angela Czubak
2022-02-14 10:51 ` Angela Czubak
2022-02-14 11:03 ` Benjamin Tissoires
2022-02-14 10:53 ` Benjamin Tissoires
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=20220126161832.3193805-1-benjamin.tissoires@redhat.com \
--to=benjamin.tissoires@redhat.com \
--cc=corbet@lwn.net \
--cc=dmitry.torokhov@gmail.com \
--cc=jikos@kernel.org \
--cc=killertofu@gmail.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nabijaczleweli@nabijaczleweli.xyz \
--cc=peter.hutterer@who-t.net \
--cc=pinglinux@gmail.com \
--cc=skomra@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.