* [PATCH] drm/exynos: fimc: disable LCLK during cleanup
@ 2026-09-13 1:34 Myeonghun Pak
0 siblings, 0 replies; only message in thread
From: Myeonghun Pak @ 2026-09-13 1:34 UTC (permalink / raw)
To: Inki Dae, Seung-Woo Kim, Kyungmin Park
Cc: David Airlie, Simona Vetter, Krzysztof Kozlowski, Peter Griffin,
Alim Akhtar, Sylwester Nawrocki, dri-devel, linux-arm-kernel,
linux-samsung-soc, linux-kernel, Ijae Kim
fimc_setup_clocks() prepares and enables FIMC_CLK_LCLK after acquiring
the clocks. The later component_add() failure path and normal remove path
only put the clock references, leaving LCLK prepared and enabled.
The runtime PM callbacks manage only FIMC_CLK_GATE, and component bind and
unbind do not change LCLK ownership. Disable LCLK at the cleanup sites
that are reached only after fimc_setup_clocks() succeeds. Keep the setup
failure path unchanged because it can put the clocks before LCLK has been
enabled.
This issue was identified during our ongoing static-analysis research while
reviewing kernel code.
Fixes: e5f8683923af ("drm/exynos: rework fimc clocks handling")
Assisted-by: OpenAI:GPT-5.6
Co-developed-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Ijae Kim <ae878000@gmail.com>
Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
drivers/gpu/drm/exynos/exynos_drm_fimc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/exynos/exynos_drm_fimc.c b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
index 09e33a26c..58214abb5 100644
--- a/drivers/gpu/drm/exynos/exynos_drm_fimc.c
+++ b/drivers/gpu/drm/exynos/exynos_drm_fimc.c
@@ -1362,6 +1362,7 @@ static int fimc_probe(struct platform_device *pdev)
err_pm_dis:
pm_runtime_dont_use_autosuspend(dev);
pm_runtime_disable(dev);
+ clk_disable_unprepare(ctx->clocks[FIMC_CLK_LCLK]);
fimc_put_clocks(ctx);
return ret;
@@ -1376,6 +1377,7 @@ static void fimc_remove(struct platform_device *pdev)
pm_runtime_dont_use_autosuspend(dev);
pm_runtime_disable(dev);
+ clk_disable_unprepare(ctx->clocks[FIMC_CLK_LCLK]);
fimc_put_clocks(ctx);
}
--
2.47.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-13 1:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-13 1:34 [PATCH] drm/exynos: fimc: disable LCLK during cleanup Myeonghun Pak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).