commit | cb3656f84c0980623cd390a6dd855874c3d90335 | [log] [tgz] |
---|---|---|
author | Ben Chan <benchan@chromium.org> | Tue May 29 18:21:16 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Tue Dec 15 06:27:07 2020 |
tree | a82c4f12653d4c186a8331c7cac45d90cde57ca0 | |
parent | c768e6c073941e7282fb040b6f3d9d09cc4415b5 [diff] |
UPSTREAM: HID: multitouch: fix calculation of last slot field in multi-touch reports According to [1] and also seemingly agreed by [2], the Scan Time usage (0x0D 0x56) is a report level usage, not a contact level usage. However, the hid-multitouch driver currently includes HID_DG_SCANTIME when calculating `td->last_slot_field', which may lead to mt_complete_slot() being prematurely called in certain cases (e.g. when each touch input report includes more than one contact and the Scan Time usage appears before any contact logical collection). This patch fixes the issue by skipping mt_store_field() on HID_DG_SCANTIME, similar to how HID_DG_CONTACTCOUNT and HID_DG_CONTACTMAX. [1] https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-precision-touchpad-required-hid-top-level-collections#windows-precision-touchpad-input-reports [2] https://patchwork.kernel.org/patch/1742181/ Fixes: 29cc309d8bf19 ("HID: hid-multitouch: forward MSC_TIMESTAMP") Signed-off-by: Ben Chan <benchan@chromium.org> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz> (backported from commit abb36fe691b28f2a64926b61448d6b9610ed879a in https://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid.git for-4.18/multitouch branch) BUG=chromium:847561 TEST=Verified with the latest eve touchpad firmware, which includes the Scan Time usage in touch input reports. Change-Id: Id4ea83fce008b5e1b3bb06a84f9f7ef69f9e8283 Signed-off-by: Yuxin Jiao <jiaoyuxin@huaqin.corp-partner.google.com> (cherry picked from commit abb36fe691b28f2a64926b61448d6b9610ed879a) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2588680 Reviewed-by: Sean Paul <seanpaul@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>