* [PATCH] dmaengine: sprd-dma: handle runtime PM get failure
@ 2026-08-18 12:41 Jiawen Liu
2026-08-18 16:38 ` Frank Li
0 siblings, 1 reply; 3+ messages in thread
From: Jiawen Liu @ 2026-08-18 12:41 UTC (permalink / raw)
To: Vinod Koul, Orson Zhai, Baolin Wang, dmaengine, linux-kernel
Cc: Frank Li, Chunyan Zhang, jiawen
From: jiawen <1298662399@qq.com>
Route failed runtime-PM acquisition through its existing cleanup path.
Release and disable runtime PM before continuing with the hardware
teardown, so an unsuccessful pm_runtime_get_sync() does not leave
runtime PM enabled.
Signed-off-by: jiawen <1298662399@qq.com>
---
diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
--- a/drivers/dma/sprd-dma.c
+++ b/drivers/dma/sprd-dma.c
@@ -1212,7 +1212,7 @@
ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0)
- goto err_rpm;
+ goto err_register;
ret = dma_async_device_register(&sdev->dma_dev);
if (ret < 0) {
@@ -1234,7 +1234,6 @@
err_register:
pm_runtime_put_noidle(&pdev->dev);
pm_runtime_disable(&pdev->dev);
-err_rpm:
sprd_dma_disable(sdev);
return ret;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: sprd-dma: handle runtime PM get failure
2026-08-18 12:41 [PATCH] dmaengine: sprd-dma: handle runtime PM get failure Jiawen Liu
@ 2026-08-18 16:38 ` Frank Li
2026-08-19 19:33 ` Frank Li
0 siblings, 1 reply; 3+ messages in thread
From: Frank Li @ 2026-08-18 16:38 UTC (permalink / raw)
To: Jiawen Liu
Cc: Vinod Koul, Orson Zhai, Baolin Wang, dmaengine, linux-kernel,
Frank Li, Chunyan Zhang
On Tue, Aug 18, 2026 at 04:41:24PM +0400, Jiawen Liu wrote:
> From: jiawen <1298662399@qq.com>
>
> Route failed runtime-PM acquisition through its existing cleanup path.
>
> Release and disable runtime PM before continuing with the hardware
> teardown, so an unsuccessful pm_runtime_get_sync() does not leave
> runtime PM enabled.
>
> Signed-off-by: jiawen <1298662399@qq.com>
> ---
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1212,7 +1212,7 @@
>
> ret = pm_runtime_get_sync(&pdev->dev);
Use cleanup
PM_RUNTIME_ACQUIRE_IF_ENABLED(&pdev->dev, pm)
ret = PM_RUNTIME_ACQUIRE_ERR(&pm)
if (ret)
...
Frank
> if (ret < 0)
> - goto err_rpm;
> + goto err_register;
>
> ret = dma_async_device_register(&sdev->dma_dev);
> if (ret < 0) {
> @@ -1234,7 +1234,6 @@
> err_register:
> pm_runtime_put_noidle(&pdev->dev);
> pm_runtime_disable(&pdev->dev);
> -err_rpm:
> sprd_dma_disable(sdev);
> return ret;
> }
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dmaengine: sprd-dma: handle runtime PM get failure
2026-08-18 16:38 ` Frank Li
@ 2026-08-19 19:33 ` Frank Li
0 siblings, 0 replies; 3+ messages in thread
From: Frank Li @ 2026-08-19 19:33 UTC (permalink / raw)
To: Jiawen Liu
Cc: Vinod Koul, Orson Zhai, Baolin Wang, dmaengine, linux-kernel,
Frank Li, Chunyan Zhang
On Tue, Aug 18, 2026 at 11:38:20AM -0500, Frank Li wrote:
> On Tue, Aug 18, 2026 at 04:41:24PM +0400, Jiawen Liu wrote:
> > From: jiawen <1298662399@qq.com>
> >
> > Route failed runtime-PM acquisition through its existing cleanup path.
> >
> > Release and disable runtime PM before continuing with the hardware
> > teardown, so an unsuccessful pm_runtime_get_sync() does not leave
> > runtime PM enabled.
> >
> > Signed-off-by: jiawen <1298662399@qq.com>
> > ---
> > diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> > --- a/drivers/dma/sprd-dma.c
> > +++ b/drivers/dma/sprd-dma.c
> > @@ -1212,7 +1212,7 @@
> >
> > ret = pm_runtime_get_sync(&pdev->dev);
>
> Use cleanup
>
> PM_RUNTIME_ACQUIRE_IF_ENABLED(&pdev->dev, pm)
> ret = PM_RUNTIME_ACQUIRE_ERR(&pm)
> if (ret)
> ...
>
> Frank
Rouyu wang already post the same fix
https://patchwork.kernel.org/project/linux-dmaengine/patch/20260813153149.3953497-1-ruoyuw560@gmail.com/
Frank
>
>
> > if (ret < 0)
> > - goto err_rpm;
> > + goto err_register;
> >
> > ret = dma_async_device_register(&sdev->dma_dev);
> > if (ret < 0) {
> > @@ -1234,7 +1234,6 @@
> > err_register:
> > pm_runtime_put_noidle(&pdev->dev);
> > pm_runtime_disable(&pdev->dev);
> > -err_rpm:
> > sprd_dma_disable(sdev);
> > return ret;
> > }
> >
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-19 19:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-18 12:41 [PATCH] dmaengine: sprd-dma: handle runtime PM get failure Jiawen Liu
2026-08-18 16:38 ` Frank Li
2026-08-19 19:33 ` Frank Li
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®