[PATCH] drm/panfrost: add missing pm_runtime_dont_use_autosuspend() calls
From: Joshua Crofts
Date: Wed Sep 16 2026 - 03:57:14 EST
panfrost_remove() and panfrost_probe() disable PM runtime on teardown or
failure but don't call the pm_runtime_dont_use_autosuspend() function,
causing potential resource leaks.
Add the missing function calls.
Found using Coccinelle.
Fixes: 5c0c825ae4c6 ("drm/panfrost: Replace DRM driver allocation method with newer one")
Cc: <stable@xxxxxxxxxxxxxxx>
Signed-off-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
---
drivers/gpu/drm/panfrost/panfrost_drv.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/panfrost/panfrost_drv.c b/drivers/gpu/drm/panfrost/panfrost_drv.c
index 36cc2e67a308..74e8e5783f9b 100644
--- a/drivers/gpu/drm/panfrost/panfrost_drv.c
+++ b/drivers/gpu/drm/panfrost/panfrost_drv.c
@@ -1012,6 +1012,7 @@ static int panfrost_probe(struct platform_device *pdev)
err_out2:
drm_dev_unregister(&pfdev->base);
err_out1:
+ pm_runtime_dont_use_autosuspend(pfdev->base.dev);
pm_runtime_disable(pfdev->base.dev);
panfrost_device_fini(pfdev);
pm_runtime_set_suspended(pfdev->base.dev);
@@ -1027,6 +1028,7 @@ static void panfrost_remove(struct platform_device *pdev)
panfrost_gem_shrinker_cleanup(&pfdev->base);
pm_runtime_get_sync(pfdev->base.dev);
+ pm_runtime_dont_use_autosuspend(pfdev->base.dev);
pm_runtime_disable(pfdev->base.dev);
panfrost_device_fini(pfdev);
pm_runtime_set_suspended(pfdev->base.dev);
--
2.47.3