Home Home > GIT Browse > SLE15
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2019-06-16 10:45:04 +0200
committerTakashi Iwai <tiwai@suse.de>2019-06-16 10:45:31 +0200
commit79b71a91111f0ef3e433c142085b14a3799aaf0a (patch)
tree7f2c6c0754413d5ebe68dc07d030abfd49de9334
parent9cca7947fd4eb67c579cfbfb2b775758bef7009b (diff)
HID: wacom: Sync INTUOSP2_BT touch state after each frame if
necessary (bsc#1051510).
-rw-r--r--patches.drivers/HID-wacom-Sync-INTUOSP2_BT-touch-state-after-each-fr.patch55
-rw-r--r--series.conf1
2 files changed, 56 insertions, 0 deletions
diff --git a/patches.drivers/HID-wacom-Sync-INTUOSP2_BT-touch-state-after-each-fr.patch b/patches.drivers/HID-wacom-Sync-INTUOSP2_BT-touch-state-after-each-fr.patch
new file mode 100644
index 0000000000..e3e0901a0f
--- /dev/null
+++ b/patches.drivers/HID-wacom-Sync-INTUOSP2_BT-touch-state-after-each-fr.patch
@@ -0,0 +1,55 @@
+From 69dbdfffef20c715df9f381b2cee4e9e0a4efd93 Mon Sep 17 00:00:00 2001
+From: Jason Gerecke <jason.gerecke@wacom.com>
+Date: Tue, 7 May 2019 11:53:22 -0700
+Subject: [PATCH] HID: wacom: Sync INTUOSP2_BT touch state after each frame if necessary
+Git-commit: 69dbdfffef20c715df9f381b2cee4e9e0a4efd93
+Patch-mainline: v5.2 or v5.2-rc5 (next release)
+References: bsc#1051510
+
+The Bluetooth interface of the 2nd-gen Intuos Pro batches together four
+independent "frames" of finger data into a single report. Each frame
+is essentially equivalent to a single USB report, with the up-to-10
+fingers worth of information being spread across two frames. At the
+moment the driver only calls `input_sync` after processing all four
+frames have been processed, which can result in the driver sending
+multiple updates for a single slot within the same SYN_REPORT. This
+can confuse userspace, so modify the driver to sync more often if
+necessary (i.e., after reporting the state of all fingers).
+
+Fixes: 4922cd26f03c ("HID: wacom: Support 2nd-gen Intuos Pro's Bluetooth classic interface")
+Cc: <stable@vger.kernel.org> # 4.11+
+Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
+Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+
+---
+ drivers/hid/wacom_wac.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/hid/wacom_wac.c b/drivers/hid/wacom_wac.c
+index e848445236d8..09b8e4aac82f 100644
+--- a/drivers/hid/wacom_wac.c
++++ b/drivers/hid/wacom_wac.c
+@@ -1371,11 +1371,17 @@ static void wacom_intuos_pro2_bt_touch(struct wacom_wac *wacom)
+ if (wacom->num_contacts_left <= 0) {
+ wacom->num_contacts_left = 0;
+ wacom->shared->touch_down = wacom_wac_finger_count_touches(wacom);
++ input_sync(touch_input);
+ }
+ }
+
+- input_report_switch(touch_input, SW_MUTE_DEVICE, !(data[281] >> 7));
+- input_sync(touch_input);
++ if (wacom->num_contacts_left == 0) {
++ // Be careful that we don't accidentally call input_sync with
++ // only a partial set of fingers of processed
++ input_report_switch(touch_input, SW_MUTE_DEVICE, !(data[281] >> 7));
++ input_sync(touch_input);
++ }
++
+ }
+
+ static void wacom_intuos_pro2_bt_pad(struct wacom_wac *wacom)
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index ea70463f9a..ea70ebb33a 100644
--- a/series.conf
+++ b/series.conf
@@ -22482,6 +22482,7 @@
patches.drivers/HID-wacom-Don-t-report-anything-prior-to-the-tool-en.patch
patches.drivers/HID-wacom-Send-BTN_TOUCH-in-response-to-INTUOSP2_BT-.patch
patches.drivers/HID-wacom-Correct-button-numbering-2nd-gen-Intuos-Pr.patch
+ patches.drivers/HID-wacom-Sync-INTUOSP2_BT-touch-state-after-each-fr.patch
patches.drivers/ALSA-hda-realtek-Update-headset-mode-for-ALC256.patch
patches.drivers/ALSA-firewire-motu-fix-destruction-of-data-for-isoch.patch
patches.drivers/ALSA-oxfw-allow-PCM-capture-for-Stanton-SCS.1m.patch