Re: [PATCH] drm/panfrost: Fix runtime PM leak in panfrost_remove()

From: Adrian Larumbe

Date: Mon Nov 02 2026 - 14:03:08 EST


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@xxxxxxxxxxxxxxx
> Signed-off-by: Wentao Liang <vulab@xxxxxxxxxxx>
> ---
> 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