[PATCH 02/13] drm: Discard pm_runtime_put_autosuspend() return values
From: Brian Norris
Date: Tue Oct 06 2026 - 19:21:19 EST
Several DRM drivers use or propagate the pm_runtime_put_autosuspend()
return value, which is not particularly useful.
Returning an error code from pm_runtime_put_autosuspend() merely means
that it has not queued up a timer or work item to check whether or not
the device can be suspended and there are many perfectly valid
situations in which that can happen, like after writing "on" to the
device's runtime PM "control" attribute in sysfs for one example.
For this reason, modify these drivers to simply discard the
pm_runtime_put_autosuspend() return value, and change the return type of
v3d_pm_runtime_put() (whose return value is never used) to void. Also
drop the redundant pm_runtime_mark_last_busy() calls right before
pm_runtime_put_autosuspend().
This will facilitate a planned change of the
pm_runtime_put_autosuspend() return type to void in the future, similar
to commit 3afd8df02433 ("PM: runtime: Change pm_runtime_put() return
type to void").
Signed-off-by: Brian Norris <briannorris@xxxxxxxxxxxx>
---
This patch is independent of the rest of the series, except for the end
(changing the return type). I expect it can be applied by individual
maintainers, and we pick up the end once the dust is settled.
drivers/gpu/drm/panel/panel-simple.c | 8 +-------
drivers/gpu/drm/tidss/tidss_drv.c | 7 +------
drivers/gpu/drm/v3d/v3d_drv.h | 4 ++--
3 files changed, 4 insertions(+), 15 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index c95964ba25a9..193d1b2b0ba5 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -318,12 +318,7 @@ static int panel_simple_suspend(struct device *dev)
static int panel_simple_unprepare(struct drm_panel *panel)
{
- int ret;
-
- pm_runtime_mark_last_busy(panel->dev);
- ret = pm_runtime_put_autosuspend(panel->dev);
- if (ret < 0)
- return ret;
+ pm_runtime_put_autosuspend(panel->dev);
return 0;
}
@@ -389,7 +384,6 @@ static int panel_simple_get_modes(struct drm_panel *panel,
num += drm_edid_connector_add_modes(connector);
- pm_runtime_mark_last_busy(panel->dev);
pm_runtime_put_autosuspend(panel->dev);
}
diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c
index 1c8cc18bc53c..44b0b009c29a 100644
--- a/drivers/gpu/drm/tidss/tidss_drv.c
+++ b/drivers/gpu/drm/tidss/tidss_drv.c
@@ -40,12 +40,7 @@ int tidss_runtime_get(struct tidss_device *tidss)
void tidss_runtime_put(struct tidss_device *tidss)
{
- int r;
-
- pm_runtime_mark_last_busy(tidss->dev);
-
- r = pm_runtime_put_autosuspend(tidss->dev);
- WARN_ON(r < 0);
+ pm_runtime_put_autosuspend(tidss->dev);
}
static int __maybe_unused tidss_pm_runtime_suspend(struct device *dev)
diff --git a/drivers/gpu/drm/v3d/v3d_drv.h b/drivers/gpu/drm/v3d/v3d_drv.h
index 29fa14be130b..eb002048ae9c 100644
--- a/drivers/gpu/drm/v3d/v3d_drv.h
+++ b/drivers/gpu/drm/v3d/v3d_drv.h
@@ -669,9 +669,9 @@ static __always_inline int v3d_pm_runtime_get(struct v3d_dev *v3d)
return pm_runtime_resume_and_get(v3d->drm.dev);
}
-static __always_inline int v3d_pm_runtime_put(struct v3d_dev *v3d)
+static __always_inline void v3d_pm_runtime_put(struct v3d_dev *v3d)
{
- return pm_runtime_put_autosuspend(v3d->drm.dev);
+ pm_runtime_put_autosuspend(v3d->drm.dev);
}
/* v3d_sched.c */
--
2.56.0.360.g66cac248cb-goog