* [PATCH] drm/exynos: fimd: fix clock leak on resume error path
@ 2026-08-18 12:41 Jiawen Liu
2026-08-19 13:01 ` Inki Dae
2026-08-19 14:36 ` Markus Elfring
0 siblings, 2 replies; 3+ messages in thread
From: Jiawen Liu @ 2026-08-18 12:41 UTC (permalink / raw)
To: Inki Dae, Seung-Woo Kim, Kyungmin Park, David Airlie,
Simona Vetter, Krzysztof Kozlowski, Peter Griffin, dri-devel,
linux-arm-kernel, linux-samsung-soc, linux-kernel
Cc: Alim Akhtar, jiawen
From: jiawen <1298662399@qq.com>
exynos_fimd_resume() can fail when clk_prepare_enable() succeeds for
bus_clk but fails for lcd_clk. The function returns the error without
disabling bus_clk, leaving it prepared and enabled.
Disable bus_clk before returning the error to keep the clock state
balanced.
Signed-off-by: jiawen <1298662399@qq.com>
---
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
--- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
@@ -1325,6 +1325,7 @@
DRM_DEV_ERROR(dev,
"Failed to prepare_enable the lcd clk [%d]\n",
ret);
+ clk_disable_unprepare(ctx->bus_clk);
return ret;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/exynos: fimd: fix clock leak on resume error path
2026-08-18 12:41 [PATCH] drm/exynos: fimd: fix clock leak on resume error path Jiawen Liu
@ 2026-08-19 13:01 ` Inki Dae
2026-08-19 14:36 ` Markus Elfring
1 sibling, 0 replies; 3+ messages in thread
From: Inki Dae @ 2026-08-19 13:01 UTC (permalink / raw)
To: Jiawen Liu
Cc: Seung-Woo Kim, Kyungmin Park, David Airlie, Simona Vetter,
Krzysztof Kozlowski, Peter Griffin, dri-devel, linux-arm-kernel,
linux-samsung-soc, linux-kernel, Alim Akhtar
Hi,
2026년 8월 18일 (화) 오후 9:46, Jiawen Liu <1298662399@qq.com>님이 작성:
>
> From: jiawen <1298662399@qq.com>
>
> exynos_fimd_resume() can fail when clk_prepare_enable() succeeds for
> bus_clk but fails for lcd_clk. The function returns the error without
> disabling bus_clk, leaving it prepared and enabled.
>
> Disable bus_clk before returning the error to keep the clock state
> balanced.
>
> Signed-off-by: jiawen <1298662399@qq.com>
> ---
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimd.c b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> --- a/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_fimd.c
> @@ -1325,6 +1325,7 @@
> DRM_DEV_ERROR(dev,
> "Failed to prepare_enable the lcd clk [%d]\n",
> ret);
> + clk_disable_unprepare(ctx->bus_clk);
The analysis and the fix are correct. exynos_fimd_suspend() disables
both clocks, so leaving bus_clk enabled on this error path does leave
the refcount unbalanced, and clk_disable_unprepare(ctx->bus_clk)
restores the symmetry.
Merged. Thanks,
Inki Dae
> return ret;
> }
>
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/exynos: fimd: fix clock leak on resume error path
2026-08-18 12:41 [PATCH] drm/exynos: fimd: fix clock leak on resume error path Jiawen Liu
2026-08-19 13:01 ` Inki Dae
@ 2026-08-19 14:36 ` Markus Elfring
1 sibling, 0 replies; 3+ messages in thread
From: Markus Elfring @ 2026-08-19 14:36 UTC (permalink / raw)
To: 1298662399, dri-devel, linux-arm-kernel, linux-samsung-soc,
David Airlie, Inki Dae, Krzysztof Kozlowski, Kyungmin Park,
Peter Griffin, Seung-Woo Kim, Simona Vetter
Cc: LKML, Alim Akhtar
…
> Disable bus_clk before returning the error to keep the clock state
> balanced.
How do you think about to add any tags (like “Fixes” and “Cc”) accordingly?
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v7.2#n145
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/stable-kernel-rules.rst?h=v7.2#n34
Regards,
Markus
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-19 14:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-18 12:41 [PATCH] drm/exynos: fimd: fix clock leak on resume error path Jiawen Liu
2026-08-19 13:01 ` Inki Dae
2026-08-19 14:36 ` Markus Elfring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox