Browse Source

Update v5.7 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/c9354ce40c5419fe99e76b4f08f9aa38c70a7717
- SAM: https://github.com/linux-surface/surface-aggregator-module/commit/99b024313615009b2f940e9d166e78e81ab39704
Maximilian Luz 5 years ago
parent
commit
36bf7dd80e
3 changed files with 48 additions and 32 deletions
  1. 46 30
      patches/5.7/0003-surface-sam.patch
  2. 1 1
      patches/5.7/0004-wifi.patch
  3. 1 1
      patches/5.7/0005-ipts.patch

+ 46 - 30
patches/5.7/0003-surface-sam.patch

@@ -1,4 +1,4 @@
-From abe232973324da458501e918a62ccf15c437e54a Mon Sep 17 00:00:00 2001
+From d69ea97670ad5bdd1e4bc82e88d2ecc3ad817252 Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Fri, 6 Dec 2019 11:56:12 +0100
 Subject: [PATCH 3/5] surface-sam
@@ -12,18 +12,18 @@ Subject: [PATCH 3/5] 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 +
- 19 files changed, 11747 insertions(+)
+ 19 files changed, 11763 insertions(+)
  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
@@ -3123,10 +3123,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.
@@ -3158,27 +3158,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,
 +};
@@ -3239,25 +3234,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),
 +	},
 +	{ },
@@ -3285,8 +3280,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),
 +	},
 +	{ },
@@ -3303,8 +3310,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),
 +	},
 +	{ },
@@ -5489,10 +5508,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
@@ -6852,10 +6871,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.
@@ -6863,7 +6880,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;
 +		}
@@ -8847,7 +8863,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;

+ 1 - 1
patches/5.7/0004-wifi.patch

@@ -1,4 +1,4 @@
-From bf1c4e526aa439ae5ff037358a3a5d147d511bc6 Mon Sep 17 00:00:00 2001
+From d82ffe8a01324c5265859ab354d680e05ca89c34 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 4/5] wifi

+ 1 - 1
patches/5.7/0005-ipts.patch

@@ -1,4 +1,4 @@
-From 581eddff8c3e07a85fbf369236f4f54816e1543b Mon Sep 17 00:00:00 2001
+From dbf74ff638f8afc58685779a010c8db4cedb9e4d Mon Sep 17 00:00:00 2001
 From: Dorian Stoll <dorian.stoll@tmsp.io>
 Date: Mon, 27 Jan 2020 21:16:20 +0100
 Subject: [PATCH 5/5] ipts