* [PATCH] drm/panfrost: Fix runtime PM leak in panfrost_remove()
@ 2026-09-16 18:08 Wentao Liang
2026-11-02 19:02 ` Adrian Larumbe
0 siblings, 1 reply; 2+ messages in thread
From: Wentao Liang @ 2026-09-16 18:08 UTC (permalink / raw)
To: adrian.larumbe
Cc: airlied, boris.brezillon, dri-devel, eric, linux-kernel,
maarten.lankhorst, mripard, neil.armstrong, robh, simona,
steven.price, tomeu, tzimmermann, Wentao Liang, stable
The pm_runtime_get_sync() call keeps the device awake while the
hardware is torn down, but the usage counter it takes is never
dropped, so the count is left permanently elevated once runtime PM
has been disabled. Drop it with pm_runtime_put_noidle() once the
device has been marked suspended.
Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 074c0995ddc2..6d047ca7e208 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -1029,6 +1029,7 @@ static void panfrost_remove(struct platform_device *pdev)
pm_runtime_disable(pfdev->base.dev);
panfrost_device_fini(pfdev);
pm_runtime_set_suspended(pfdev->base.dev);
+ pm_runtime_put_noidle(pfdev->base.dev);
}
static ssize_t profiling_show(struct device *dev,
--
2.34.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/panfrost: Fix runtime PM leak in panfrost_remove()
2026-09-16 18:08 [PATCH] drm/panfrost: Fix runtime PM leak in panfrost_remove() Wentao Liang
@ 2026-11-02 19:02 ` Adrian Larumbe
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Larumbe @ 2026-11-02 19:02 UTC (permalink / raw)
To: Wentao Liang
Cc: airlied, boris.brezillon, dri-devel, eric, linux-kernel,
maarten.lankhorst, mripard, neil.armstrong, robh, simona,
steven.price, tomeu, tzimmermann, stable
Hi Wentao, thanks for the patch.
However, a fix for the same issue had been in the making for some time. It's already been upstreamed:
e9672bf9382f ("drm/panfrost: Fix PM refcnt and autosuspend issues at device probe/remove")
Kind Regards,
Adrian
On 16.09.2026 18:08, Wentao Liang wrote:
> The pm_runtime_get_sync() call keeps the device awake while the
> hardware is torn down, but the usage counter it takes is never
> dropped, so the count is left permanently elevated once runtime PM
> has been disabled. Drop it with pm_runtime_put_noidle() once the
> device has been marked suspended.
>
> Fixes: f3ba91228e8e ("drm/panfrost: Add initial panfrost driver")
> Cc: stable@vger.kernel.org
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
> drivers/gpu/drm/panfrost/panfrost_drv.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
> index 074c0995ddc2..6d047ca7e208 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_drv.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
> @@ -1029,6 +1029,7 @@ static void panfrost_remove(struct platform_device *pdev)
> pm_runtime_disable(pfdev->base.dev);
> panfrost_device_fini(pfdev);
> pm_runtime_set_suspended(pfdev->base.dev);
> + pm_runtime_put_noidle(pfdev->base.dev);
> }
>
> static ssize_t profiling_show(struct device *dev,
> --
> 2.34.1
Adrian Larumbe
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-02 19:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-16 18:08 [PATCH] drm/panfrost: Fix runtime PM leak in panfrost_remove() Wentao Liang
2026-11-02 19:02 ` Adrian Larumbe
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®