* [PATCH] drm/exynos: fimd: handle runtime resume failure for DP clock
@ 2026-10-03 8:09 Jiale Yao
0 siblings, 0 replies; only message in thread
From: Jiale Yao @ 2026-10-03 8:09 UTC (permalink / raw)
To: Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie,
Simona Vetter, Krzysztof Kozlowski, Peter Griffin, Alim Akhtar,
Tomi Valkeinen, Marek Szyprowski, dri-devel, linux-arm-kernel,
linux-samsung-soc, linux-kernel
Cc: Jiale Yao
fimd_dp_clock_enable() ignores runtime resume failures and still writes
the DP clock register and updates dp_clk_enabled. This can access an
unavailable device, record a state that was not applied to hardware,
and later drop a runtime PM reference that was never acquired.
Return without changing the clock state when runtime resume fails.
Fixes: 5d91394f2361 ("drm/exynos: fimd: Guard display clock control with runtime PM calls")
Signed-off-by: Jiale Yao <yaojiale02@163.com>
---
drivers/gpu/drm/exynos/exynos_drm_fimd.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
index b6abdc4f2b0a..ea2b961f0cbc 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -1049,12 +1049,18 @@ static void fimd_dp_clock_enable(struct exynos_drm_clk *clk, bool enable)
struct fimd_context *ctx = container_of(clk, struct fimd_context,
dp_clk);
u32 val = enable ? DP_MIE_CLK_DP_ENABLE : DP_MIE_CLK_DISABLE;
+ int ret;
if (enable == ctx->dp_clk_enabled)
return;
- if (enable)
- pm_runtime_resume_and_get(ctx->dev);
+ if (enable) {
+ ret = pm_runtime_resume_and_get(ctx->dev);
+ if (ret < 0) {
+ dev_warn(ctx->dev, "failed to enable FIMD device: %d\n", ret);
+ return;
+ }
+ }
ctx->dp_clk_enabled = enable;
writel(val, ctx->regs + DP_MIE_CLKCON);
--
2.34.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-03 8:10 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-03 8:09 [PATCH] drm/exynos: fimd: handle runtime resume failure for DP clock Jiale Yao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox