* [PATCH 0/3] soundwire: amd: fixes and improvements
@ 2025-05-30 5:43 Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 1/3] soundwire: amd: fix for handling slave alerts after link is down Vijendar Mukunda
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Vijendar Mukunda @ 2025-05-30 5:43 UTC (permalink / raw)
To: vkoul
Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
linux-sound, linux-kernel, Vijendar Mukunda
This patch series consists of fixes and improvements for
AMD Soundwire stack.
Vijendar Mukunda (3):
soundwire: amd: fix for handling slave alerts after link is down
soundwire: amd: serialize amd manager resume sequence during
pm_prepare
soundwire: amd: cancel pending slave status handling workqueue during
remove sequence
drivers/soundwire/amd_manager.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--
2.45.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/3] soundwire: amd: fix for handling slave alerts after link is down
2025-05-30 5:43 [PATCH 0/3] soundwire: amd: fixes and improvements Vijendar Mukunda
@ 2025-05-30 5:43 ` Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 2/3] soundwire: amd: serialize amd manager resume sequence during pm_prepare Vijendar Mukunda
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Vijendar Mukunda @ 2025-05-30 5:43 UTC (permalink / raw)
To: vkoul
Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
linux-sound, linux-kernel, Vijendar Mukunda
Sometimes, its observed that during system level suspend callback
execution, after link is down, handling pending slave status workqueue
results in mipi register access failures as shown below.
soundwire sdw-master-0-0: trf on Slave 1 failed:-110 read addr 0 count 1
rt722-sdca sdw:0:0:025d:0722:01: SDW_DP0_INT recheck read failed:-110
rt722-sdca sdw:0:0:025d:0722:01: Slave 1 alert handling failed: -110
amd_sdw_manager amd_sdw_manager.0: SDW0 cmd response timeout occurred
amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1
soundwire sdw-master-0-0: trf on Slave 1 failed:-110 write addr 5c count 1
amd_sdw_manager amd_sdw_manager.0: SDW0 previous cmd status clear failed
amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1
soundwire sdw-master-0-0: trf on Slave 1 failed:-110 write addr 5d count 1
amd_sdw_manager amd_sdw_manager.0: SDW0 previous cmd status clear failed
amd_sdw_manager amd_sdw_manager.0: command timeout for Slave 1
Cancel the pending slave status workqueue prior to initiating clock stop
sequence during suspend callback execution for both the power modes.
Fixes: 9cf1efc5ed2d ("soundwire: amd: add pm_prepare callback and pm ops support")
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
drivers/soundwire/amd_manager.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
index a12c68b93b1c..a9a57cb6257c 100644
--- a/drivers/soundwire/amd_manager.c
+++ b/drivers/soundwire/amd_manager.c
@@ -1209,6 +1209,7 @@ static int __maybe_unused amd_suspend(struct device *dev)
}
if (amd_manager->power_mode_mask & AMD_SDW_CLK_STOP_MODE) {
+ cancel_work_sync(&amd_manager->amd_sdw_work);
amd_sdw_wake_enable(amd_manager, false);
if (amd_manager->acp_rev >= ACP70_PCI_REV_ID) {
ret = amd_sdw_host_wake_enable(amd_manager, false);
@@ -1219,6 +1220,7 @@ static int __maybe_unused amd_suspend(struct device *dev)
if (ret)
return ret;
} else if (amd_manager->power_mode_mask & AMD_SDW_POWER_OFF_MODE) {
+ cancel_work_sync(&amd_manager->amd_sdw_work);
amd_sdw_wake_enable(amd_manager, false);
if (amd_manager->acp_rev >= ACP70_PCI_REV_ID) {
ret = amd_sdw_host_wake_enable(amd_manager, false);
--
2.45.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/3] soundwire: amd: serialize amd manager resume sequence during pm_prepare
2025-05-30 5:43 [PATCH 0/3] soundwire: amd: fixes and improvements Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 1/3] soundwire: amd: fix for handling slave alerts after link is down Vijendar Mukunda
@ 2025-05-30 5:43 ` Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 3/3] soundwire: amd: cancel pending slave status handling workqueue during remove sequence Vijendar Mukunda
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Vijendar Mukunda @ 2025-05-30 5:43 UTC (permalink / raw)
To: vkoul
Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
linux-sound, linux-kernel, Vijendar Mukunda
During pm_prepare callback, pm_request_resume() delays SoundWire manager D0
entry sequence. Synchronize runtime resume sequence for amd_manager
instance prior to invoking child devices resume sequence for both the amd
power modes(ClockStop Mode and Power off mode).
Change the power_mode_mask check and use pm_runtime_resume() in
amd_pm_prepare() callback.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
drivers/soundwire/amd_manager.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
index a9a57cb6257c..b775ecab697c 100644
--- a/drivers/soundwire/amd_manager.c
+++ b/drivers/soundwire/amd_manager.c
@@ -1178,10 +1178,10 @@ static int __maybe_unused amd_pm_prepare(struct device *dev)
* device is not in runtime suspend state, observed that device alerts are missing
* without pm_prepare on AMD platforms in clockstop mode0.
*/
- if (amd_manager->power_mode_mask & AMD_SDW_CLK_STOP_MODE) {
- ret = pm_request_resume(dev);
+ if (amd_manager->power_mode_mask) {
+ ret = pm_runtime_resume(dev);
if (ret < 0) {
- dev_err(bus->dev, "pm_request_resume failed: %d\n", ret);
+ dev_err(bus->dev, "pm_runtime_resume failed: %d\n", ret);
return 0;
}
}
--
2.45.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/3] soundwire: amd: cancel pending slave status handling workqueue during remove sequence
2025-05-30 5:43 [PATCH 0/3] soundwire: amd: fixes and improvements Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 1/3] soundwire: amd: fix for handling slave alerts after link is down Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 2/3] soundwire: amd: serialize amd manager resume sequence during pm_prepare Vijendar Mukunda
@ 2025-05-30 5:43 ` Vijendar Mukunda
2025-06-07 0:06 ` [PATCH 0/3] soundwire: amd: fixes and improvements Mukunda,Vijendar
2025-06-09 16:17 ` Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Vijendar Mukunda @ 2025-05-30 5:43 UTC (permalink / raw)
To: vkoul
Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
linux-sound, linux-kernel, Vijendar Mukunda
During remove sequence, cancel the pending slave status update workqueue.
Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
---
drivers/soundwire/amd_manager.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
index b775ecab697c..8913a1a83007 100644
--- a/drivers/soundwire/amd_manager.c
+++ b/drivers/soundwire/amd_manager.c
@@ -1074,6 +1074,7 @@ static void amd_sdw_manager_remove(struct platform_device *pdev)
int ret;
pm_runtime_disable(&pdev->dev);
+ cancel_work_sync(&amd_manager->amd_sdw_work);
amd_disable_sdw_interrupts(amd_manager);
sdw_bus_master_delete(&amd_manager->bus);
ret = amd_disable_sdw_manager(amd_manager);
--
2.45.2
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] soundwire: amd: fixes and improvements
2025-05-30 5:43 [PATCH 0/3] soundwire: amd: fixes and improvements Vijendar Mukunda
` (2 preceding siblings ...)
2025-05-30 5:43 ` [PATCH 3/3] soundwire: amd: cancel pending slave status handling workqueue during remove sequence Vijendar Mukunda
@ 2025-06-07 0:06 ` Mukunda,Vijendar
2025-06-09 16:17 ` Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Mukunda,Vijendar @ 2025-06-07 0:06 UTC (permalink / raw)
To: vkoul
Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
linux-sound, linux-kernel
On 30/05/25 11:13, Vijendar Mukunda wrote:
> This patch series consists of fixes and improvements for
> AMD Soundwire stack.
@vinod: Could you please help to review the patch series?
This patch series contains fix for system level suspend/resume scenarios
which needs to be landed on OEM kernel base.
>
> Vijendar Mukunda (3):
> soundwire: amd: fix for handling slave alerts after link is down
> soundwire: amd: serialize amd manager resume sequence during
> pm_prepare
> soundwire: amd: cancel pending slave status handling workqueue during
> remove sequence
>
> drivers/soundwire/amd_manager.c | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 0/3] soundwire: amd: fixes and improvements
2025-05-30 5:43 [PATCH 0/3] soundwire: amd: fixes and improvements Vijendar Mukunda
` (3 preceding siblings ...)
2025-06-07 0:06 ` [PATCH 0/3] soundwire: amd: fixes and improvements Mukunda,Vijendar
@ 2025-06-09 16:17 ` Vinod Koul
4 siblings, 0 replies; 6+ messages in thread
From: Vinod Koul @ 2025-06-09 16:17 UTC (permalink / raw)
To: Vijendar Mukunda
Cc: yung-chuan.liao, pierre-louis.bossart, sanyog.r.kale,
Basavaraj.Hiregoudar, Sunil-kumar.Dommati, venkataprasad.potturu,
linux-sound, linux-kernel
On Fri, 30 May 2025 11:13:38 +0530, Vijendar Mukunda wrote:
> This patch series consists of fixes and improvements for
> AMD Soundwire stack.
>
> Vijendar Mukunda (3):
> soundwire: amd: fix for handling slave alerts after link is down
> soundwire: amd: serialize amd manager resume sequence during
> pm_prepare
> soundwire: amd: cancel pending slave status handling workqueue during
> remove sequence
>
> [...]
Applied, thanks!
[1/3] soundwire: amd: fix for handling slave alerts after link is down
commit: 86a4371b76976158be875dc654ceee35c574b27b
[2/3] soundwire: amd: serialize amd manager resume sequence during pm_prepare
(no commit info)
[3/3] soundwire: amd: cancel pending slave status handling workqueue during remove sequence
(no commit info)
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-06-09 16:17 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-05-30 5:43 [PATCH 0/3] soundwire: amd: fixes and improvements Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 1/3] soundwire: amd: fix for handling slave alerts after link is down Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 2/3] soundwire: amd: serialize amd manager resume sequence during pm_prepare Vijendar Mukunda
2025-05-30 5:43 ` [PATCH 3/3] soundwire: amd: cancel pending slave status handling workqueue during remove sequence Vijendar Mukunda
2025-06-07 0:06 ` [PATCH 0/3] soundwire: amd: fixes and improvements Mukunda,Vijendar
2025-06-09 16:17 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®