summarylogtreecommitdiffstats
path: root/0003-HID-multitouch-drop-reports-containing-invalid-value.patch
diff options
context:
space:
mode:
authorJoey Pabalinas2018-06-30 17:35:15 -1000
committerJoey Pabalinas2018-06-30 17:35:15 -1000
commit7160ff9fc51814697dca5e99ae31cf60caf6d9c2 (patch)
tree78e1f3fb67712f71507458a89585f4dcffbe1216 /0003-HID-multitouch-drop-reports-containing-invalid-value.patch
parentd14294613fbf2d3346ceaa17ba903bb985de541a (diff)
downloadaur-7160ff9fc51814697dca5e99ae31cf60caf6d9c2.tar.gz
upgpkg: linux-surfacepro3-git 4.18rc2.r298.g883c9ab9eb595f8542-1
upstream release
Diffstat (limited to '0003-HID-multitouch-drop-reports-containing-invalid-value.patch')
-rw-r--r--0003-HID-multitouch-drop-reports-containing-invalid-value.patch48
1 files changed, 48 insertions, 0 deletions
diff --git a/0003-HID-multitouch-drop-reports-containing-invalid-value.patch b/0003-HID-multitouch-drop-reports-containing-invalid-value.patch
new file mode 100644
index 00000000000..9649e0ffc09
--- /dev/null
+++ b/0003-HID-multitouch-drop-reports-containing-invalid-value.patch
@@ -0,0 +1,48 @@
+From 29ad484c1b357fd7fd670a6f252d097677b808f8 Mon Sep 17 00:00:00 2001
+Message-Id: <29ad484c1b357fd7fd670a6f252d097677b808f8.1530402641.git.joeypabalinas@gmail.com>
+In-Reply-To: <cover.1530402641.git.joeypabalinas@gmail.com>
+References: <cover.1530402641.git.joeypabalinas@gmail.com>
+From: Joey Pabalinas <joeypabalinas@gmail.com>
+To: linux-input@vger.kernel.org
+CC: linux-kernel@vger.kernel.org
+CC: Jiri Kosina <jikos@kernel.org>
+CC: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+CC: Daniel Martin <consume.noise@gmail.com>
+CC: Joey Pabalinas <joeypabalinas@gmail.com>
+Date: Sat, 30 Jun 2018 13:29:56 -1000
+Subject: [PATCH 3/4] HID: multitouch: drop reports containing invalid values
+
+Avoid processing reports containing invalid values to reduce
+multitouch input stutter.
+
+Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
+
+ 1 file changed, 9 insertions(+)
+
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index c0654db0b736543ca0..08b50e5908cecdda66 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -694,10 +694,19 @@ static void mt_complete_slot(struct mt_device *td, struct input_dev *input)
+ {
+ if ((td->mtclass.quirks & MT_QUIRK_CONTACT_CNT_ACCURATE) &&
+ td->num_received >= td->num_expected)
+ return;
+
++ /* drop invalid values after counting them */
++ if (td->curdata.x == 0xffff &&
++ td->curdata.y == 0xffff &&
++ td->curdata.w == 0xffff &&
++ td->curdata.h == 0xffff) {
++ td->num_received++;
++ return;
++ }
++
+ if (td->curvalid || (td->mtclass.quirks & MT_QUIRK_ALWAYS_VALID)) {
+ int active;
+ int slotnum = mt_compute_slot(td, input);
+ struct mt_slot *s = &td->curdata;
+ struct input_mt *mt = input->mt;
+--
+2.18.0
+