summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoey Pabalinas2018-06-30 17:35:15 -1000
committerJoey Pabalinas2018-06-30 17:35:15 -1000
commit7160ff9fc51814697dca5e99ae31cf60caf6d9c2 (patch)
tree78e1f3fb67712f71507458a89585f4dcffbe1216
parentd14294613fbf2d3346ceaa17ba903bb985de541a (diff)
downloadaur-7160ff9fc51814697dca5e99ae31cf60caf6d9c2.tar.gz
upgpkg: linux-surfacepro3-git 4.18rc2.r298.g883c9ab9eb595f8542-1
upstream release
-rw-r--r--.SRCINFO16
-rw-r--r--0001-HID-multitouch-add-MT_QUIRK_NOT_SEEN_MEANS_UP-to-MT_.patch44
-rw-r--r--0002-HID-multitouch-don-t-check-HID_GROUP_MULTITOUCH_WIN_.patch44
-rw-r--r--0003-HID-multitouch-drop-reports-containing-invalid-value.patch48
-rw-r--r--0004-HID-multitouch-remove-unneeded-else-conditional-case.patch73
-rw-r--r--PKGBUILD28
6 files changed, 230 insertions, 23 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8ddb2ed6c44..5cf293e4787 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
pkgbase = linux-surfacepro3-git
- pkgver = 4.18rc2.r223.g1904148a361a07fb2d
+ pkgver = 4.18rc2.r298.g883c9ab9eb595f8542
pkgrel = 1
url = http://www.kernel.org/
arch = i686
@@ -18,17 +18,19 @@ pkgbase = linux-surfacepro3-git
source = config
source = config.x86_64
source = config.sp3
- source = touchscreen_multitouch_fixes1.patch
- source = touchscreen_multitouch_fixes2.patch
- source = kvm.patch
+ source = 0001-HID-multitouch-add-MT_QUIRK_NOT_SEEN_MEANS_UP-to-MT_.patch
+ source = 0002-HID-multitouch-don-t-check-HID_GROUP_MULTITOUCH_WIN_.patch
+ source = 0003-HID-multitouch-drop-reports-containing-invalid-value.patch
+ source = 0004-HID-multitouch-remove-unneeded-else-conditional-case.patch
sha256sums = SKIP
sha256sums = 31d109a2f5864d865b3ce3c310158b2e9ae77f9c424f2af5a7e45548d62a2eb3
sha256sums = becc0c98cff692dee9500f19d38882636caf4c58d5086c7725690a245532f5dc
sha256sums = 56152d1f7cac31d0a9a7414e950106c3945d5de8d50bc75cf7385fa46078b1de
sha256sums = f3d9407345f2dce4966d2ffbc45d3d83d6f9fdcbac1efe83e8816b63e20d09b0
- sha256sums = cc78e8844d9ec4bd29cce392a3e4683061646e1ad7c100c4958a5cadabb25b52
- sha256sums = 34b4e00ffcf9efc43ab47444d14febb94432d340d0f1d5bcd56153879d1be113
- sha256sums = 80ea7d3afaa333572d79fbf39c0370641faea3a013f76747a7465c3a96a58be6
+ sha256sums = 82f1b3fd8d59ca406225c9915e3799d9bafad440a211eb50fcca0cefbb8ecb2a
+ sha256sums = 28ccd02a460f65af19655d505e3fb37a12497093d70da06f58f5084c0fa1ebd9
+ sha256sums = 1778e4076654d857e994062c0f92fa3528bae5595d235ec8b51f55f7c14b036b
+ sha256sums = b2b2e6d9037d04c168311c25e6b4d2295d1e153f132782c6397341d105edbafd
pkgname = linux-surfacepro3-git
pkgdesc = The Linux-surfacepro3 kernel and modules (git version)
diff --git a/0001-HID-multitouch-add-MT_QUIRK_NOT_SEEN_MEANS_UP-to-MT_.patch b/0001-HID-multitouch-add-MT_QUIRK_NOT_SEEN_MEANS_UP-to-MT_.patch
new file mode 100644
index 00000000000..d05cfa5fddb
--- /dev/null
+++ b/0001-HID-multitouch-add-MT_QUIRK_NOT_SEEN_MEANS_UP-to-MT_.patch
@@ -0,0 +1,44 @@
+From 958e450a066289c94ba03429166c972c54be6fb3 Mon Sep 17 00:00:00 2001
+Message-Id: <958e450a066289c94ba03429166c972c54be6fb3.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:13:16 -1000
+Subject: [PATCH 1/4] HID: multitouch: add MT_QUIRK_NOT_SEEN_MEANS_UP to MT_CLS_WIN_8 quirks
+
+The firmware found in the touch screen of the Surface Pro 3 is slightly
+buggy and occasionally doesn't send lift off reports for contacts; add
+MT_QUIRK_NOT_SEEN_MEANS_UP to .quirks to compensate for the missed
+reports.
+
+Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
+
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index 45968f7970f87775fa..a793076139d7d0db9b 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -242,11 +242,12 @@ static struct mt_class mt_classes[] = {
+ .quirks = MT_QUIRK_ALWAYS_VALID |
+ MT_QUIRK_IGNORE_DUPLICATES |
+ MT_QUIRK_HOVERING |
+ MT_QUIRK_CONTACT_CNT_ACCURATE |
+ MT_QUIRK_STICKY_FINGERS |
+- MT_QUIRK_WIN8_PTP_BUTTONS },
++ MT_QUIRK_WIN8_PTP_BUTTONS |
++ MT_QUIRK_NOT_SEEN_MEANS_UP },
+ { .name = MT_CLS_EXPORT_ALL_INPUTS,
+ .quirks = MT_QUIRK_ALWAYS_VALID |
+ MT_QUIRK_CONTACT_CNT_ACCURATE,
+ .export_all_inputs = true },
+ { .name = MT_CLS_WIN_8_DUAL,
+--
+2.18.0
+
diff --git a/0002-HID-multitouch-don-t-check-HID_GROUP_MULTITOUCH_WIN_.patch b/0002-HID-multitouch-don-t-check-HID_GROUP_MULTITOUCH_WIN_.patch
new file mode 100644
index 00000000000..d6da6346b4a
--- /dev/null
+++ b/0002-HID-multitouch-don-t-check-HID_GROUP_MULTITOUCH_WIN_.patch
@@ -0,0 +1,44 @@
+From 0aaacf083be5b68a830f9e174f9abee3b00c5a51 Mon Sep 17 00:00:00 2001
+Message-Id: <0aaacf083be5b68a830f9e174f9abee3b00c5a51.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:23:05 -1000
+Subject: [PATCH 2/4] HID: multitouch: don't check HID_GROUP_MULTITOUCH_WIN_8 for serial protocol
+
+The HID_GROUP_MULTITOUCH_WIN_8 group never needs to check for the serial
+protocol, so avoid setting `td->serial_maybe = true;` in order to avoid
+an unnecessary mt_post_parse_default_settings() call
+
+Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
+
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index a793076139d7d0db9b..c0654db0b736543ca0 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -1460,11 +1460,13 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id)
+ if (!td->fields) {
+ dev_err(&hdev->dev, "cannot allocate multitouch fields data\n");
+ return -ENOMEM;
+ }
+
+- if (id->vendor == HID_ANY_ID && id->product == HID_ANY_ID)
++ if (id->vendor == HID_ANY_ID
++ && id->product == HID_ANY_ID
++ && id->group != HID_GROUP_MULTITOUCH_WIN_8)
+ td->serial_maybe = true;
+
+ /* This allows the driver to correctly support devices
+ * that emit events over several HID messages.
+ */
+--
+2.18.0
+
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
+
diff --git a/0004-HID-multitouch-remove-unneeded-else-conditional-case.patch b/0004-HID-multitouch-remove-unneeded-else-conditional-case.patch
new file mode 100644
index 00000000000..67b59e95f65
--- /dev/null
+++ b/0004-HID-multitouch-remove-unneeded-else-conditional-case.patch
@@ -0,0 +1,73 @@
+From d35643165a1d1972fd91e547922697a3c785a413 Mon Sep 17 00:00:00 2001
+Message-Id: <d35643165a1d1972fd91e547922697a3c785a413.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:34:22 -1000
+Subject: [PATCH 4/4] HID: multitouch: remove unneeded else conditional cases
+
+Elide lone `else` cases and replace `else if` clauses
+with plain `if` conditionals when they occur immediately
+after return statements.
+
+Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
+
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c
+index 08b50e5908cecdda66..30b1a2c67f39a41325 100644
+--- a/drivers/hid/hid-multitouch.c
++++ b/drivers/hid/hid-multitouch.c
+@@ -205,12 +205,12 @@ static void mt_post_parse(struct mt_device *td);
+
+ static int cypress_compute_slot(struct mt_device *td)
+ {
+ if (td->curdata.contactid != 0 || td->num_received == 0)
+ return td->curdata.contactid;
+- else
+- return -1;
++
++ return -1;
+ }
+
+ static struct mt_class mt_classes[] = {
+ { .name = MT_CLS_DEFAULT,
+ .quirks = MT_QUIRK_ALWAYS_VALID |
+@@ -803,12 +803,12 @@ static int mt_compute_timestamp(struct mt_device *td, struct hid_field *field,
+ delta *= 100;
+
+ if (jdelta > MAX_TIMESTAMP_INTERVAL)
+ /* No data received for a while, resync the timestamp. */
+ return 0;
+- else
+- return td->timestamp + delta;
++
++ return td->timestamp + delta;
+ }
+
+ static int mt_touch_event(struct hid_device *hid, struct hid_field *field,
+ struct hid_usage *usage, __s32 value)
+ {
+@@ -1110,11 +1110,12 @@ static int mt_input_mapping(struct hid_device *hdev, struct hid_input *hi,
+ * HID_DG_CONTACTCOUNT from the pen report as it is outside the physical
+ * collection, but within the report ID.
+ */
+ if (field->physical == HID_DG_STYLUS)
+ return 0;
+- else if ((field->physical == 0) &&
++
++ if ((field->physical == 0) &&
+ (field->report->id != td->mt_report_id) &&
+ (td->mt_report_id != -1))
+ return 0;
+
+ if (field->application == HID_DG_TOUCHSCREEN ||
+--
+2.18.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 503d1ef1f99..8473ca3e2b8 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgbase=linux-surfacepro3-git
_srcname=linux
-pkgver=4.18rc2.r223.g1904148a361a07fb2d
+pkgver=4.18rc2.r298.g883c9ab9eb595f8542
pkgrel=1
arch=('i686' 'x86_64')
url="http://www.kernel.org/"
@@ -15,22 +15,23 @@ source=(
# standard config files for mkinitcpio ramdisk
"${pkgbase}.preset"
"config" "config.x86_64" "config.sp3"
- "touchscreen_multitouch_fixes1.patch"
- "touchscreen_multitouch_fixes2.patch"
- "kvm.patch")
+ "0001-HID-multitouch-add-MT_QUIRK_NOT_SEEN_MEANS_UP-to-MT_.patch"
+ "0002-HID-multitouch-don-t-check-HID_GROUP_MULTITOUCH_WIN_.patch"
+ "0003-HID-multitouch-drop-reports-containing-invalid-value.patch"
+ "0004-HID-multitouch-remove-unneeded-else-conditional-case.patch")
sha256sums=('SKIP'
'31d109a2f5864d865b3ce3c310158b2e9ae77f9c424f2af5a7e45548d62a2eb3'
'becc0c98cff692dee9500f19d38882636caf4c58d5086c7725690a245532f5dc'
'56152d1f7cac31d0a9a7414e950106c3945d5de8d50bc75cf7385fa46078b1de'
'f3d9407345f2dce4966d2ffbc45d3d83d6f9fdcbac1efe83e8816b63e20d09b0'
- 'cc78e8844d9ec4bd29cce392a3e4683061646e1ad7c100c4958a5cadabb25b52'
- '34b4e00ffcf9efc43ab47444d14febb94432d340d0f1d5bcd56153879d1be113'
- '80ea7d3afaa333572d79fbf39c0370641faea3a013f76747a7465c3a96a58be6')
+ '82f1b3fd8d59ca406225c9915e3799d9bafad440a211eb50fcca0cefbb8ecb2a'
+ '28ccd02a460f65af19655d505e3fb37a12497093d70da06f58f5084c0fa1ebd9'
+ '1778e4076654d857e994062c0f92fa3528bae5595d235ec8b51f55f7c14b036b'
+ 'b2b2e6d9037d04c168311c25e6b4d2295d1e153f132782c6397341d105edbafd')
_sp3config="y"
# _makenconfig="y"
_interactive="y"
-_kvmkillable_patch="n"
_touchscreen_patch="n"
_kernelname="${pkgbase#linux}"
@@ -47,14 +48,9 @@ prepare() {
# These patches work around buggy hardware implementations
# in the surface pro 3 touchscreen module.
if [[ "$_touchscreen_patch" == y ]]; then
- patch -p1 -F5 -i "$srcdir/touchscreen_multitouch_fixes1.patch"
- patch -p1 -F5 -i "$srcdir/touchscreen_multitouch_fixes2.patch"
- fi
-
- # This patch replaces the TASK_UNINTERRUPTIBLE
- # wait implementation with a TASK_KILLABLE one.
- if [[ "$_kvmkillable_patch" == y ]]; then
- patch -p1 -F5 -i "$srcdir/kvm.patch"
+ for i in "$srcdir/"000*.patch; do
+ patch -p1 <"$i"
+ done
fi
## If sp3config='y' use personal config as a base