|
@@ -1,4 +1,4 @@
|
|
|
-From f1e5790f35c449ef7f2d58a593c8885e1e4e7593 Mon Sep 17 00:00:00 2001
|
|
|
+From b502533eed8f36ce336bca0e94f6cbc17436924b Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:20 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Improve documentation and
|
|
@@ -289,7 +289,7 @@ index 45501b6e54e8a..5c4ae1a261831 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From 00be15cfa408d197fa4a67497f77b1b9a219a6ca Mon Sep 17 00:00:00 2001
|
|
|
+From 7a144446f9697c8c41d2797f8b0f449e7e9d48f6 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:21 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Add target and source IDs to
|
|
@@ -486,7 +486,7 @@ index 2a2c17771d014..55cc61bba1da6 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From 52565050eff2b59ace90d991359302113b080b3a Mon Sep 17 00:00:00 2001
|
|
|
+From 82758e79911b132072d91dd50fbfd5a68dbaf45a Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:22 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_hub: Use target-ID enum instead
|
|
@@ -529,7 +529,7 @@ index 43061514be382..62f27cdb6ca8f 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From 4ef206d30a18ce369acadc096ea1063fa84630fa Mon Sep 17 00:00:00 2001
|
|
|
+From 91baa7368041b23a1e90d6146f6d19b39971ffe2 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:23 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_tabletsw: Use target-ID enum
|
|
@@ -581,7 +581,7 @@ index 27d95a6a78513..bd8cd453c393a 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From 1ca8947bd038449af9fdd517ef0e24581e50bc61 Mon Sep 17 00:00:00 2001
|
|
|
+From 6dc76fe5e04b3993b053bcb98e5dc667ce5de521 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:24 +0100
|
|
|
Subject: [PATCH] platform/surface: dtx: Use target-ID enum instead of
|
|
@@ -679,7 +679,7 @@ index ed36944467f9f..0de76a784a35f 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From 9e90d7de897a66212be2f1748e43ace637e18d7a Mon Sep 17 00:00:00 2001
|
|
|
+From 6dcf01487132c13c4ee9d4ad3c018c76bfd93dd7 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:25 +0100
|
|
|
Subject: [PATCH] HID: surface-hid: Use target-ID enum instead of hard-coding
|
|
@@ -713,7 +713,7 @@ index 0635341bc5174..42933bf3e925f 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From c22230e331fa008cc04df609626e7ad9e5c78e52 Mon Sep 17 00:00:00 2001
|
|
|
+From b7f6696922646109b36aae6790508b1c09720c42 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:26 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Enforce use of target-ID enum
|
|
@@ -949,7 +949,7 @@ index 46c45d1b63682..4da20b7a0ee5e 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From c2e31f0f140b36da8bf7a357ae0d0890471dbe15 Mon Sep 17 00:00:00 2001
|
|
|
+From e4c2cb93fb1f29f3fd3c50455f6f7ac83d2fdce2 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Fri, 2 Dec 2022 23:33:27 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Fix target-ID of
|
|
@@ -1004,7 +1004,7 @@ index 023f126121d7d..296f72d52e6a6 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From 0d0eaddaa93ba99588edb9d81090b7a9f27522cb Mon Sep 17 00:00:00 2001
|
|
|
+From c7d9487a23737ae1383040b39bca91ece4701de1 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Tue, 20 Dec 2022 18:56:08 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator: Rename top-level request
|
|
@@ -1551,7 +1551,7 @@ index 4da20b7a0ee5e..1545e5567b152 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From 57cd850cc4e731b1aef940e223316e65d611f687 Mon Sep 17 00:00:00 2001
|
|
|
+From 3487981527de78819d2c36d408c88e1ae2547750 Mon Sep 17 00:00:00 2001
|
|
|
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
|
|
|
Date: Wed, 18 Jan 2023 11:38:23 +0200
|
|
|
Subject: [PATCH] platform/surface: Switch to use acpi_evaluate_dsm_typed()
|
|
@@ -1607,7 +1607,7 @@ index f004a24952013..7b6d887dccdbf 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From f826bda5f17474bb8dcfb44d6728812df3259034 Mon Sep 17 00:00:00 2001
|
|
|
+From 2056bf3282af74ba2a2417b3487b35c01e926e54 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sat, 4 Mar 2023 20:09:36 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_tabletsw: Properly handle
|
|
@@ -1915,7 +1915,7 @@ index 9fed800c7cc09..e8682f52558f3 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From 4d23c1fa6e6125a9882cae320fea417cfb43ac19 Mon Sep 17 00:00:00 2001
|
|
|
+From f7a30283ca7f4c6b94ad87d214f140d3cc655f82 Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 19 Feb 2023 23:33:43 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_tabletsw: Add support for
|
|
@@ -2032,7 +2032,7 @@ index e8682f52558f3..8f52b62d1c195 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
-From a85b1bb1e3eeff3dafa8a6e33b9d251556220267 Mon Sep 17 00:00:00 2001
|
|
|
+From 0519cfd79ce48acaf98a44502efd16ceeef373cb Mon Sep 17 00:00:00 2001
|
|
|
From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
Date: Sun, 19 Feb 2023 23:41:18 +0100
|
|
|
Subject: [PATCH] platform/surface: aggregator_registry: Add support for
|
|
@@ -2063,3 +2063,63 @@ index 296f72d52e6a6..0fe5be5396525 100644
|
|
|
--
|
|
|
2.40.1
|
|
|
|
|
|
+From 2bfd9bbca0ebf3d4d8dc63a2cd751c3176ed071d Mon Sep 17 00:00:00 2001
|
|
|
+From: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Date: Wed, 3 May 2023 02:02:21 +0200
|
|
|
+Subject: [PATCH] platform/surface: aggregator: Allow completion work-items to
|
|
|
+ be executed in parallel
|
|
|
+
|
|
|
+Currently, event completion work-items are restricted to be run strictly
|
|
|
+in non-parallel fashion by the respective workqueue. However, this has
|
|
|
+lead to some problems:
|
|
|
+
|
|
|
+In some instances, the event notifier function called inside this
|
|
|
+completion workqueue takes a non-negligible amount of time to execute.
|
|
|
+One such example is the battery event handling code (surface_battery.c),
|
|
|
+which can result in a full battery information refresh, involving
|
|
|
+further synchronous communication with the EC inside the event handler.
|
|
|
+This is made worse if the communication fails spuriously, generally
|
|
|
+incurring a multi-second timeout.
|
|
|
+
|
|
|
+Since the event completions are run strictly non-parallel, this blocks
|
|
|
+other events from being propagated to the respective subsystems. This
|
|
|
+becomes especially noticeable for keyboard and touchpad input, which
|
|
|
+also funnel their events through this system. Here, users have reported
|
|
|
+occasional multi-second "freezes".
|
|
|
+
|
|
|
+Note, however, that the event handling system was never intended to run
|
|
|
+purely sequentially. Instead, we have one work struct per EC/SAM
|
|
|
+subsystem, processing the event queue for that subsystem. These work
|
|
|
+structs were intended to run in parallel, allowing sequential processing
|
|
|
+of work items for each subsystem but parallel processing of work items
|
|
|
+across subsystems.
|
|
|
+
|
|
|
+The only restriction to this is the way the workqueue is created.
|
|
|
+Therefore, replace create_workqueue() with alloc_workqueue() and do not
|
|
|
+restrict the maximum number of parallel work items to be executed on
|
|
|
+that queue, resolving any cross-subsystem blockage.
|
|
|
+
|
|
|
+Fixes: c167b9c7e3d6 ("platform/surface: Add Surface Aggregator subsystem")
|
|
|
+Link: https://github.com/linux-surface/linux-surface/issues/1026
|
|
|
+Signed-off-by: Maximilian Luz <luzmaximilian@gmail.com>
|
|
|
+Patchset: surface-sam
|
|
|
+---
|
|
|
+ drivers/platform/surface/aggregator/controller.c | 2 +-
|
|
|
+ 1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
+
|
|
|
+diff --git a/drivers/platform/surface/aggregator/controller.c b/drivers/platform/surface/aggregator/controller.c
|
|
|
+index 535581c0471c5..545e6628c695f 100644
|
|
|
+--- a/drivers/platform/surface/aggregator/controller.c
|
|
|
++++ b/drivers/platform/surface/aggregator/controller.c
|
|
|
+@@ -825,7 +825,7 @@ static int ssam_cplt_init(struct ssam_cplt *cplt, struct device *dev)
|
|
|
+
|
|
|
+ cplt->dev = dev;
|
|
|
+
|
|
|
+- cplt->wq = create_workqueue(SSAM_CPLT_WQ_NAME);
|
|
|
++ cplt->wq = alloc_workqueue(SSAM_CPLT_WQ_NAME, WQ_UNBOUND, WQ_MEM_RECLAIM, 0);
|
|
|
+ if (!cplt->wq)
|
|
|
+ return -ENOMEM;
|
|
|
+
|
|
|
+--
|
|
|
+2.40.1
|
|
|
+
|