Browse Source

Update v5.8 patches

Changes:
 - SAM:
   - Remove explicit dGPU power-setting code and rely on (patched)
     PCI/PM core instead for automatic and proper power management. See
     [1] and [2] for details.
   - Minor fixes.

 - GPE:
   - Add copyright notice

Links:
 - SAM: https://github.com/linux-surface/surface-aggregator-module/commit/e6338f7b04abdbd677207c71ef13bbc75746e3fd
 - GPE: https://github.com/linux-surface/surface-gpe/commit/245c2645045ea6e655c07357b2d8062b5f33ae15
 - kernel: https://github.com/linux-surface/kernel/commit/fb58dd7a0161e663e78688e3b7f1d27f559f1890

[1] https://github.com/linux-surface/surface-aggregator-module/commit/4138dabe851372a6af197fa6525d8d5f41367c58
[2] https://github.com/linux-surface/surface-aggregator-module/wiki/Discrete-GPU
Maximilian Luz 4 years ago
parent
commit
e420429a23

+ 0 - 1
configs/surface-5.8.config

@@ -1,7 +1,6 @@
 #
 # Surface Aggregator Module
 #
-CONFIG_GPIO_SYSFS=y                         # required for SURFACE_HOTPLUG
 CONFIG_SURFACE_AGGREGATOR=m
 CONFIG_SURFACE_AGGREGATOR_ERROR_INJECTION=n
 CONFIG_SURFACE_AGGREGATOR_BUS=y

+ 2 - 2
patches/5.8/0001-surface3-oemb.patch

@@ -1,4 +1,4 @@
-From 783117ef972d0dcc29d1065e4609690c9093a8c3 Mon Sep 17 00:00:00 2001
+From a071f62f9ccad02cbd533c29d268af206bfe8ef5 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Sun, 18 Oct 2020 16:42:44 +0900
 Subject: [PATCH] (surface3-oemb) add DMI matches for Surface 3 with broken DMI
@@ -97,5 +97,5 @@ index 2752dc955733..ef36a316e2ed 100644
  };
  
 -- 
-2.28.0
+2.29.2
 

+ 26 - 26
patches/5.8/0002-wifi.patch

@@ -1,4 +1,4 @@
-From c6be0add7574727c5ab9081ff4b46b4f6ef1fdf5 Mon Sep 17 00:00:00 2001
+From df4f3b986e95327601b3d7b3129a054d5c4f5c37 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Thu, 24 Sep 2020 18:02:06 +0900
 Subject: [PATCH] mwifiex: pcie: skip cancel_work_sync() on reset failure path
@@ -154,9 +154,9 @@ index fc59b522f670..048f4db6027a 100644
  
  static inline int
 -- 
-2.28.0
+2.29.2
 
-From 2b463669a76bc7cc2146481fd131cbc1233b9711 Mon Sep 17 00:00:00 2001
+From b54be410021bbb564378a6a7b7d619caac7ebe27 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Mon, 28 Sep 2020 17:46:49 +0900
 Subject: [PATCH] mwifiex: pcie: add DMI-based quirk impl for Surface devices
@@ -362,9 +362,9 @@ index 000000000000..5326ae7e5671
 +
 +void mwifiex_initialize_quirks(struct pcie_service_card *card);
 -- 
-2.28.0
+2.29.2
 
-From e344e3aa7d35ea66edb2d0792bda98ef311a9f98 Mon Sep 17 00:00:00 2001
+From 9abbacea22bbefde01c8ea4caa67bfd3df258b6b Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Tue, 29 Sep 2020 17:25:22 +0900
 Subject: [PATCH] mwifiex: pcie: add reset_d3cold quirk for Surface gen4+
@@ -563,9 +563,9 @@ index 5326ae7e5671..8b9dcb5070d8 100644
  void mwifiex_initialize_quirks(struct pcie_service_card *card);
 +int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
 -- 
-2.28.0
+2.29.2
 
-From a835d3d17471990f1c33e8a566876b1774856ac9 Mon Sep 17 00:00:00 2001
+From 3e66895299b5d5d82d87b7908eda2dd2d1ecba34 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Tue, 29 Sep 2020 17:32:22 +0900
 Subject: [PATCH] mwifiex: pcie: add reset_wsid quirk for Surface 3
@@ -742,9 +742,9 @@ index 8b9dcb5070d8..3ef7440418e3 100644
  int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
 +int mwifiex_pcie_reset_wsid_quirk(struct pci_dev *pdev);
 -- 
-2.28.0
+2.29.2
 
-From 1a027d9e20179b26a9a89cbc67570dc57decc30e Mon Sep 17 00:00:00 2001
+From 80a35612b6395e96c9dd7c815ed318ff470f1963 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Wed, 30 Sep 2020 18:08:24 +0900
 Subject: [PATCH] mwifiex: pcie: (OEMB) add quirk for Surface 3 with broken DMI
@@ -804,9 +804,9 @@ index f0a6fa0a7ae5..34dcd84f02a6 100644
  		.ident = "Surface Pro 3",
  		.matches = {
 -- 
-2.28.0
+2.29.2
 
-From b83d011dd7c568c2db41c520d3fdaadc4ff8954a Mon Sep 17 00:00:00 2001
+From cc6c7458415e05e875ec833869e4297a5a3018ce Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Thu, 24 Sep 2020 01:56:29 +0900
 Subject: [PATCH] mwifiex: fix mwifiex_shutdown_sw() causing sw reset failure
@@ -881,9 +881,9 @@ index 529099137644..c21f916c05a3 100644
  	adapter->is_up = false;
  
 -- 
-2.28.0
+2.29.2
 
-From 919ef1f9830f57b14ad8af2b812bb25ec7a5dba0 Mon Sep 17 00:00:00 2001
+From 065d5d54022849cc2d4e260ad2c3c878c112b5e0 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Thu, 24 Sep 2020 01:56:34 +0900
 Subject: [PATCH] mwifiex: pcie: use shutdown_sw()/reinit_sw() on
@@ -1000,9 +1000,9 @@ index daae572ce94e..b46d56389c3b 100644
  	return 0;
  }
 -- 
-2.28.0
+2.29.2
 
-From d63ccbb60c210c361cf48612ea3fc8f882565da6 Mon Sep 17 00:00:00 2001
+From 0f8208b32b86341d0ab6d92d1ebc116fd120e11d Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Sun, 27 Sep 2020 00:51:38 +0900
 Subject: [PATCH] mwifiex: update comment for shutdown_sw()/reinit_sw()
@@ -1043,9 +1043,9 @@ index c21f916c05a3..a26eb66865e2 100644
   */
  int
 -- 
-2.28.0
+2.29.2
 
-From c7a3556e53d7053e3bfed69c23e4a80a12ec03d4 Mon Sep 17 00:00:00 2001
+From 4e829ac5be071b4f8c80bac826d1d6583987da10 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Mon, 24 Aug 2020 17:11:35 +0900
 Subject: [PATCH] mwifiex: pcie: add enable_device_dump module parameter
@@ -1092,9 +1092,9 @@ index b46d56389c3b..1847a0274991 100644
  	if (!adapter->devdump_data) {
  		mwifiex_dbg(adapter, ERROR,
 -- 
-2.28.0
+2.29.2
 
-From bcf9d4b3af74128a676e6e5b79ac83e6e29fbbef Mon Sep 17 00:00:00 2001
+From e29d83531bb3b7768e86a471f455a350d6922269 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Sun, 4 Oct 2020 00:11:49 +0900
 Subject: [PATCH] mwifiex: pcie: disable bridge_d3 for Surface gen4+
@@ -1247,9 +1247,9 @@ index 3ef7440418e3..a95ebac06e13 100644
  void mwifiex_initialize_quirks(struct pcie_service_card *card);
  int mwifiex_pcie_reset_d3cold_quirk(struct pci_dev *pdev);
 -- 
-2.28.0
+2.29.2
 
-From 7dda35220e0c86d787ea4d1299b7ff645e992acb Mon Sep 17 00:00:00 2001
+From 62e1318d5fd6a568f95ff04328db2f17ce36ed44 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Sun, 4 Oct 2020 00:25:48 +0900
 Subject: [PATCH] mwifiex: add allow_ps_mode module parameter
@@ -1309,9 +1309,9 @@ index 4e4f59c17ded..1074bcb2606b 100644
  }
  
 -- 
-2.28.0
+2.29.2
 
-From 390fa12d3af6558f2b4bdb145c45b27129b29ba1 Mon Sep 17 00:00:00 2001
+From 16fce93f337297dcba4c95f2f35d4276b0a775b3 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Sun, 4 Oct 2020 00:59:37 +0900
 Subject: [PATCH] mwifiex: disable ps_mode explicitly by default instead
@@ -1357,9 +1357,9 @@ index 8bd355d7974e..621519826685 100644
  
  		if (drcs) {
 -- 
-2.28.0
+2.29.2
 
-From 570c6d717002dd3734452e1d6db0ac8414418b7e Mon Sep 17 00:00:00 2001
+From f80a820c8f03bc7a0fcaf6ec0304cf4be6174145 Mon Sep 17 00:00:00 2001
 From: Tsuchiya Yuto <kitakar@gmail.com>
 Date: Sun, 4 Oct 2020 00:38:48 +0900
 Subject: [PATCH] mwifiex: print message when changing ps_mode
@@ -1392,5 +1392,5 @@ index 1074bcb2606b..67800980a7f0 100644
  }
  
 -- 
-2.28.0
+2.29.2
 

+ 6 - 6
patches/5.8/0003-ipts.patch

@@ -1,4 +1,4 @@
-From 1fb79b576315c036f08e778546e71212230d9ddc Mon Sep 17 00:00:00 2001
+From 7a6081ff09e02f8771382ddfe292e807741bffb9 Mon Sep 17 00:00:00 2001
 From: Dorian Stoll <dorian.stoll@tmsp.io>
 Date: Fri, 25 Sep 2020 18:06:05 +0200
 Subject: [PATCH] mei: Remove client devices before shutting down
@@ -25,9 +25,9 @@ index bcee77768b91..21ed765003e1 100644
  	mei_cancel_work(dev);
  
 -- 
-2.28.0
+2.29.2
 
-From b9b4c4f84f5111e3213225be406e43cc11623dbc Mon Sep 17 00:00:00 2001
+From a0fcd7564e07c6b140b6db2a615d38b8ae844b34 Mon Sep 17 00:00:00 2001
 From: Dorian Stoll <dorian.stoll@tmsp.io>
 Date: Thu, 30 Jul 2020 13:21:53 +0200
 Subject: [PATCH] misc: mei: Add missing IPTS device IDs
@@ -95,9 +95,9 @@ index 2a3f2fd5df50..319158fd4393 100644
  	{MEI_PCI_DEVICE(MEI_DEV_ID_TGP_LP, MEI_ME_PCH15_CFG)},
  	{MEI_PCI_DEVICE(MEI_DEV_ID_TGP_H, MEI_ME_PCH15_SPS_CFG)},
 -- 
-2.28.0
+2.29.2
 
-From e6812c7fe4d645c770c87071d6e30cb6b960c169 Mon Sep 17 00:00:00 2001
+From 8fa42c4ef1cc0c1026803467117d46f6099d6699 Mon Sep 17 00:00:00 2001
 From: Dorian Stoll <dorian.stoll@tmsp.io>
 Date: Thu, 6 Aug 2020 11:20:41 +0200
 Subject: [PATCH] misc: Add support for Intel Precise Touch & Stylus
@@ -1444,5 +1444,5 @@ index 000000000000..4c667bb6a7f2
 +#endif /* _IPTS_UAPI_H_ */
 +
 -- 
-2.28.0
+2.29.2
 

+ 8 - 6
patches/5.8/0004-surface-gpe.patch

@@ -1,4 +1,4 @@
-From aa25cec8fd87df94cabc33c37cc0a2778d63f3d4 Mon Sep 17 00:00:00 2001
+From fae166412b1c31270f47033e6146719132cd0255 Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Sun, 16 Aug 2020 23:39:56 +0200
 Subject: [PATCH] platform/x86: Add Driver to set up lid GPEs on MS Surface
@@ -33,8 +33,8 @@ Patchset: surface-gpe
 ---
  drivers/platform/x86/Kconfig       |   9 +
  drivers/platform/x86/Makefile      |   1 +
- drivers/platform/x86/surface_gpe.c | 307 +++++++++++++++++++++++++++++
- 3 files changed, 317 insertions(+)
+ drivers/platform/x86/surface_gpe.c | 309 +++++++++++++++++++++++++++++
+ 3 files changed, 319 insertions(+)
  create mode 100644 drivers/platform/x86/surface_gpe.c
 
 diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
@@ -71,15 +71,17 @@ index 2b85852a1a87..a64ce216719a 100644
  obj-$(CONFIG_MSI_LAPTOP)	+= msi-laptop.o
 diff --git a/drivers/platform/x86/surface_gpe.c b/drivers/platform/x86/surface_gpe.c
 new file mode 100644
-index 000000000000..2857e3862ca4
+index 000000000000..88b952ee9b8b
 --- /dev/null
 +++ b/drivers/platform/x86/surface_gpe.c
-@@ -0,0 +1,307 @@
+@@ -0,0 +1,309 @@
 +// SPDX-License-Identifier: GPL-2.0-or-later
 +/*
 + * Surface GPE/Lid driver to enable wakeup from suspend via the lid by
 + * properly configuring the respective GPEs. Required for wakeup via lid on
 + * newer Intel-based Microsoft Surface devices.
++ *
++ * Copyright (C) 2020 Maximilian Luz <luzmaximilian@gmail.com>
 + */
 +
 +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
@@ -383,5 +385,5 @@ index 000000000000..2857e3862ca4
 +MODULE_LICENSE("GPL");
 +MODULE_ALIAS("dmi:*:svnMicrosoftCorporation:pnSurface*:*");
 -- 
-2.28.0
+2.29.2
 

+ 7 - 7
patches/5.8/0005-surface-sam-over-hid.patch

@@ -1,4 +1,4 @@
-From 256ed7b2d0a06dd15968828ac55d355773b19958 Mon Sep 17 00:00:00 2001
+From c55292610c890ec39f40734413a0a4d737b5d700 Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Sat, 25 Jul 2020 17:19:53 +0200
 Subject: [PATCH] i2c: acpi: Implement RawBytes read access
@@ -54,10 +54,10 @@ Patchset: surface-sam-over-hid
  1 file changed, 35 insertions(+)
 
 diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
-index 2ade99b105b9..60b9cb51d5f7 100644
+index bbf8dd491d24..72f7305ab3fc 100644
 --- a/drivers/i2c/i2c-core-acpi.c
 +++ b/drivers/i2c/i2c-core-acpi.c
-@@ -574,6 +574,28 @@ static int acpi_gsb_i2c_write_bytes(struct i2c_client *client,
+@@ -584,6 +584,28 @@ static int acpi_gsb_i2c_write_bytes(struct i2c_client *client,
  	return (ret == 1) ? 0 : -EIO;
  }
  
@@ -86,7 +86,7 @@ index 2ade99b105b9..60b9cb51d5f7 100644
  static acpi_status
  i2c_acpi_space_handler(u32 function, acpi_physical_address command,
  			u32 bits, u64 *value64,
-@@ -675,6 +697,19 @@ i2c_acpi_space_handler(u32 function, acpi_physical_address command,
+@@ -685,6 +707,19 @@ i2c_acpi_space_handler(u32 function, acpi_physical_address command,
  		}
  		break;
  
@@ -107,9 +107,9 @@ index 2ade99b105b9..60b9cb51d5f7 100644
  		dev_warn(&adapter->dev, "protocol 0x%02x not supported for client 0x%02x\n",
  			 accessor_type, client->addr);
 -- 
-2.28.0
+2.29.2
 
-From 03be5ddae354964501f25958d53525b23c9c6243 Mon Sep 17 00:00:00 2001
+From 7ec30997f8d15e3e62c9ad5d38bd8ad84a3b7328 Mon Sep 17 00:00:00 2001
 From: Maximilian Luz <luzmaximilian@gmail.com>
 Date: Sun, 6 Sep 2020 04:01:19 +0200
 Subject: [PATCH] platform/x86: Add driver for Surface Book 1 dGPU switch
@@ -330,5 +330,5 @@ index 000000000000..8c66ed5110fd
 +MODULE_DESCRIPTION("Discrete GPU Power-Switch for Surface Book 1");
 +MODULE_LICENSE("GPL");
 -- 
-2.28.0
+2.29.2
 

File diff suppressed because it is too large
+ 555 - 1320
patches/5.8/0006-surface-sam.patch


+ 0 - 70
patches/5.8/0007-i2c-core-Restore-acpi_walk_dep_device_list-getting-c.patch

@@ -1,70 +0,0 @@
-From ccc695a9170dc8469d8637568129d4ed8780448c Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede@redhat.com>
-Date: Wed, 14 Oct 2020 16:41:58 +0200
-Subject: [PATCH] i2c: core: Restore acpi_walk_dep_device_list() getting called
- after registering the ACPI i2c devs
-
-Commit 21653a4181ff ("i2c: core: Call i2c_acpi_install_space_handler()
-before i2c_acpi_register_devices()")'s intention was to only move the
-acpi_install_address_space_handler() call to the point before where
-the ACPI declared i2c-children of the adapter where instantiated by
-i2c_acpi_register_devices().
-
-But i2c_acpi_install_space_handler() had a call to
-acpi_walk_dep_device_list() hidden (that is I missed it) at the end
-of it, so as an unwanted side-effect now acpi_walk_dep_device_list()
-was also being called before i2c_acpi_register_devices().
-
-Move the acpi_walk_dep_device_list() call to the end of
-i2c_acpi_register_devices(), so that it is once again called *after*
-the i2c_client-s hanging of the adapter have been created.
-
-This fixes the Microsoft Surface Go 2 hanging at boot.
-
-Fixes: 21653a4181ff ("i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices()")
-Suggested-by: Maximilian Luz <luzmaximilian@gmail.com>
-Reported-and-tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
----
- drivers/i2c/i2c-core-acpi.c | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/i2c/i2c-core-acpi.c b/drivers/i2c/i2c-core-acpi.c
-index 60b9cb51d5f7..72f7305ab3fc 100644
---- a/drivers/i2c/i2c-core-acpi.c
-+++ b/drivers/i2c/i2c-core-acpi.c
-@@ -264,6 +264,7 @@ static acpi_status i2c_acpi_add_device(acpi_handle handle, u32 level,
- void i2c_acpi_register_devices(struct i2c_adapter *adap)
- {
- 	acpi_status status;
-+	acpi_handle handle;
- 
- 	if (!has_acpi_companion(&adap->dev))
- 		return;
-@@ -274,6 +275,15 @@ void i2c_acpi_register_devices(struct i2c_adapter *adap)
- 				     adap, NULL);
- 	if (ACPI_FAILURE(status))
- 		dev_warn(&adap->dev, "failed to enumerate I2C slaves\n");
-+
-+	if (!adap->dev.parent)
-+		return;
-+
-+	handle = ACPI_HANDLE(adap->dev.parent);
-+	if (!handle)
-+		return;
-+
-+	acpi_walk_dep_device_list(handle);
- }
- 
- const struct acpi_device_id *
-@@ -764,7 +774,6 @@ int i2c_acpi_install_space_handler(struct i2c_adapter *adapter)
- 		return -ENOMEM;
- 	}
- 
--	acpi_walk_dep_device_list(handle);
- 	return 0;
- }
- 
--- 
-2.28.0
-

Some files were not shown because too many files changed in this diff