From 14072c78f4c926bca05fb146f7504b4a1647bcab Mon Sep 17 00:00:00 2001 From: Maximilian Luz Date: Wed, 15 Jul 2020 22:26:02 +0200 Subject: [PATCH] Update v5.4 patches Changes: SAM: - Bugfix: Fix HID input for Surface Laptop 3. The driver now separates devices by IID, using the same behavior as on the Surface Book 3. - Bugfix: Minor fixes in SSH driver message system. Links: - kernel: https://github.com/linux-surface/kernel/commit/a7b8ca847f6f5f4288681a715d12e9b847381747 - SAM: https://github.com/linux-surface/surface-aggregator-module/commit/99b024313615009b2f940e9d166e78e81ab39704 --- patches/5.4/0004-surface-sam.patch | 76 ++++++++++++++++++------------ patches/5.4/0005-wifi.patch | 2 +- patches/5.4/0006-ipts.patch | 2 +- 3 files changed, 48 insertions(+), 32 deletions(-) diff --git a/patches/5.4/0004-surface-sam.patch b/patches/5.4/0004-surface-sam.patch index f24eac8c4..cda87a7ed 100644 --- a/patches/5.4/0004-surface-sam.patch +++ b/patches/5.4/0004-surface-sam.patch @@ -1,4 +1,4 @@ -From cbedf5104e92f1eff5a8c30a2416674266b5b7b8 Mon Sep 17 00:00:00 2001 +From 9fe067a9be3ad6e688acd4f4e1452a6c876e4401 Mon Sep 17 00:00:00 2001 From: qzed Date: Mon, 26 Aug 2019 01:11:08 +0200 Subject: [PATCH 4/6] surface-sam @@ -14,19 +14,19 @@ Subject: [PATCH 4/6] surface-sam .../x86/surface_sam/surface_sam_hps.c | 1297 +++++ .../x86/surface_sam/surface_sam_san.c | 913 +++ .../x86/surface_sam/surface_sam_san.h | 30 + - .../x86/surface_sam/surface_sam_sid.c | 262 + + .../x86/surface_sam/surface_sam_sid.c | 281 + .../x86/surface_sam/surface_sam_sid_gpelid.c | 232 + .../surface_sam/surface_sam_sid_perfmode.c | 216 + .../x86/surface_sam/surface_sam_sid_power.c | 1154 ++++ .../x86/surface_sam/surface_sam_sid_power.h | 15 + .../x86/surface_sam/surface_sam_sid_vhf.c | 432 ++ .../x86/surface_sam/surface_sam_sid_vhf.h | 13 + - .../x86/surface_sam/surface_sam_ssh.c | 5114 +++++++++++++++++ + .../x86/surface_sam/surface_sam_ssh.c | 5111 +++++++++++++++++ .../x86/surface_sam/surface_sam_ssh.h | 488 ++ .../x86/surface_sam/surface_sam_ssh_trace.h | 536 ++ .../x86/surface_sam/surface_sam_vhf.c | 261 + drivers/tty/serdev/core.c | 111 +- - 22 files changed, 11855 insertions(+), 16 deletions(-) + 22 files changed, 11871 insertions(+), 16 deletions(-) create mode 100644 drivers/platform/x86/surface_sam/Kconfig create mode 100644 drivers/platform/x86/surface_sam/Makefile create mode 100644 drivers/platform/x86/surface_sam/surface_sam_dtx.c @@ -3170,10 +3170,10 @@ index 0000000000000..2b9dee159bbbc +#endif /* _SURFACE_SAM_SAN_H */ diff --git a/drivers/platform/x86/surface_sam/surface_sam_sid.c b/drivers/platform/x86/surface_sam/surface_sam_sid.c new file mode 100644 -index 0000000000000..0dae6569b4265 +index 0000000000000..caa2e6446b5f4 --- /dev/null +++ b/drivers/platform/x86/surface_sam/surface_sam_sid.c -@@ -0,0 +1,262 @@ +@@ -0,0 +1,281 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Surface Integration Driver. @@ -3205,27 +3205,22 @@ index 0000000000000..0dae6569b4265 +}; + + -+static const struct ssam_hid_properties ssam_hid_props_sl3 = { -+ .registry = SSAM_EVENT_REGISTRY_REG, // TODO: needs confirmation -+ .instance = 0, -+}; -+ -+static const struct ssam_hid_properties ssam_hid_props_sb3_keyboard = { ++static const struct ssam_hid_properties ssam_hid_props_keyboard = { + .registry = SSAM_EVENT_REGISTRY_REG, + .instance = 1, +}; + -+static const struct ssam_hid_properties ssam_hid_props_sb3_touchpad = { ++static const struct ssam_hid_properties ssam_hid_props_touchpad = { + .registry = SSAM_EVENT_REGISTRY_REG, + .instance = 3, +}; + -+static const struct ssam_hid_properties ssam_hid_props_sb3_iid5 = { ++static const struct ssam_hid_properties ssam_hid_props_iid5 = { + .registry = SSAM_EVENT_REGISTRY_REG, + .instance = 5, +}; + -+static const struct ssam_hid_properties ssam_hid_props_sb3_iid6 = { ++static const struct ssam_hid_properties ssam_hid_props_iid6 = { + .registry = SSAM_EVENT_REGISTRY_REG, + .instance = 6, +}; @@ -3286,25 +3281,25 @@ index 0000000000000..0dae6569b4265 + { + .name = "surface_sam_sid_vhf", + .id = 1, -+ .platform_data = (void *)&ssam_hid_props_sb3_keyboard, ++ .platform_data = (void *)&ssam_hid_props_keyboard, + .pdata_size = sizeof(struct ssam_hid_properties), + }, + { + .name = "surface_sam_sid_vhf", + .id = 3, -+ .platform_data = (void *)&ssam_hid_props_sb3_touchpad, ++ .platform_data = (void *)&ssam_hid_props_touchpad, + .pdata_size = sizeof(struct ssam_hid_properties), + }, + { + .name = "surface_sam_sid_vhf", + .id = 5, -+ .platform_data = (void *)&ssam_hid_props_sb3_iid5, ++ .platform_data = (void *)&ssam_hid_props_iid5, + .pdata_size = sizeof(struct ssam_hid_properties), + }, + { + .name = "surface_sam_sid_vhf", + .id = 6, -+ .platform_data = (void *)&ssam_hid_props_sb3_iid6, ++ .platform_data = (void *)&ssam_hid_props_iid6, + .pdata_size = sizeof(struct ssam_hid_properties), + }, + { }, @@ -3332,8 +3327,20 @@ index 0000000000000..0dae6569b4265 + }, + { + .name = "surface_sam_sid_vhf", -+ .id = -1, -+ .platform_data = (void *)&ssam_hid_props_sl3, ++ .id = 1, ++ .platform_data = (void *)&ssam_hid_props_keyboard, ++ .pdata_size = sizeof(struct ssam_hid_properties), ++ }, ++ { ++ .name = "surface_sam_sid_vhf", ++ .id = 3, ++ .platform_data = (void *)&ssam_hid_props_touchpad, ++ .pdata_size = sizeof(struct ssam_hid_properties), ++ }, ++ { ++ .name = "surface_sam_sid_vhf", ++ .id = 5, ++ .platform_data = (void *)&ssam_hid_props_iid5, + .pdata_size = sizeof(struct ssam_hid_properties), + }, + { }, @@ -3350,8 +3357,20 @@ index 0000000000000..0dae6569b4265 + }, + { + .name = "surface_sam_sid_vhf", -+ .id = -1, -+ .platform_data = (void *)&ssam_hid_props_sl3, ++ .id = 1, ++ .platform_data = (void *)&ssam_hid_props_keyboard, ++ .pdata_size = sizeof(struct ssam_hid_properties), ++ }, ++ { ++ .name = "surface_sam_sid_vhf", ++ .id = 3, ++ .platform_data = (void *)&ssam_hid_props_touchpad, ++ .pdata_size = sizeof(struct ssam_hid_properties), ++ }, ++ { ++ .name = "surface_sam_sid_vhf", ++ .id = 5, ++ .platform_data = (void *)&ssam_hid_props_iid5, + .pdata_size = sizeof(struct ssam_hid_properties), + }, + { }, @@ -5536,10 +5555,10 @@ index 0000000000000..eb55485ccb119 +#endif /* _SURFACE_SAM_SID_VHF_H */ diff --git a/drivers/platform/x86/surface_sam/surface_sam_ssh.c b/drivers/platform/x86/surface_sam/surface_sam_ssh.c new file mode 100644 -index 0000000000000..8f2c9b2182dc0 +index 0000000000000..9f44bdfbc4fd7 --- /dev/null +++ b/drivers/platform/x86/surface_sam/surface_sam_ssh.c -@@ -0,0 +1,5114 @@ +@@ -0,0 +1,5111 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * Surface Serial Hub (SSH) driver for communication with the Surface/System @@ -6899,10 +6918,8 @@ index 0000000000000..8f2c9b2182dc0 + * If we are cancelling or completing this packet, ignore it. + * It's going to be removed from this queue shortly. + */ -+ if (test_bit(SSH_PACKET_SF_LOCKED_BIT, &p->state)) { -+ spin_unlock(&ptl->queue.lock); ++ if (test_bit(SSH_PACKET_SF_LOCKED_BIT, &p->state)) + continue; -+ } + + /* + * Packets should be ordered non-blocking/to-be-resent first. @@ -6910,7 +6927,6 @@ index 0000000000000..8f2c9b2182dc0 + * process any following packet either and abort. + */ + if (!ssh_ptl_tx_can_process(p)) { -+ spin_unlock(&ptl->queue.lock); + packet = ERR_PTR(-EBUSY); + break; + } @@ -8894,7 +8910,7 @@ index 0000000000000..8f2c9b2182dc0 + + packet_args.type = SSH_PACKET_TY_BLOCKING; + if (!(flags & SSAM_REQUEST_UNSEQUENCED)) -+ packet_args.type = SSH_PACKET_TY_SEQUENCED; ++ packet_args.type |= SSH_PACKET_TY_SEQUENCED; + + packet_args.priority = SSH_PACKET_PRIORITY(DATA, 0); + packet_args.ops = &ssh_rtl_packet_ops; diff --git a/patches/5.4/0005-wifi.patch b/patches/5.4/0005-wifi.patch index 1091eaa6d..f9a88e1ac 100644 --- a/patches/5.4/0005-wifi.patch +++ b/patches/5.4/0005-wifi.patch @@ -1,4 +1,4 @@ -From dd358559eec2dc062e1b047096bf641cecf39a68 Mon Sep 17 00:00:00 2001 +From 21d75f9e70de41d4471dfe5d979120fb127e3519 Mon Sep 17 00:00:00 2001 From: kitakar5525 <34676735+kitakar5525@users.noreply.github.com> Date: Thu, 20 Feb 2020 16:51:11 +0900 Subject: [PATCH 5/6] wifi diff --git a/patches/5.4/0006-ipts.patch b/patches/5.4/0006-ipts.patch index 790ae1279..81687bcfc 100644 --- a/patches/5.4/0006-ipts.patch +++ b/patches/5.4/0006-ipts.patch @@ -1,4 +1,4 @@ -From c8ca30cc9e5f90196cde47f69bc78b17aae305c9 Mon Sep 17 00:00:00 2001 +From 2b11f864bf10eb5567ce741dcddfd2460a7cf89d Mon Sep 17 00:00:00 2001 From: Dorian Stoll Date: Mon, 27 Jan 2020 21:16:20 +0100 Subject: [PATCH 6/6] ipts