Re: [PATCH] drm/msm/dsi: fix AHB clock staying enabled across suspend
From: Alexey Minnekhanov
Date: Thu Oct 08 2026 - 19:59:23 EST
On 06.10.2026 16:13, Arpit Saini wrote:
pm_clk_suspend()/resume() only call clk_disable()/clk_enable() for the
AHB ("iface") clock, never clk_unprepare(), so prepare_count never
reaches 0. The clock (and its source) stays reported as enabled
through s2idle suspend even though the display stack is fully
suspended:
disp_cc_mdss_ahb_clk [19200000] ->
disp_cc_mdss_ahb_clk_src [19200000] ->
bi_tcxo [19200000] -> xo-board [76800000]
disp_cc_mdss_ahb_clk_src [19200000] ->
bi_tcxo [19200000] -> xo-board [76800000]
Calling clk_prepare_enable()/clk_disable_unprepare() directly from the
PHY's runtime_suspend/runtime_resume is not safe either, since it can
deadlock against the PHY's own PLL clocks taking the global CCF
prepare_lock during clk_prepare()/clk_unprepare().
Fix this by moving clk_prepare()/clk_unprepare() out of the runtime PM
path. clk_enable()/clk_disable() (spinlock only) stay in
runtime_suspend/runtime_resume. clk_prepare()/clk_unprepare() move to
suspend_late/resume_early, avoiding the prepare_lock collision and
actually dropping prepare_count to 0. DPM_FLAG_NO_DIRECT_COMPLETE
ensures these hooks always run on sleep.
Fixes: 0b3ccb76b95b ("drm/msm/dsi: Fix 14nm DSI PHY PLL Lock issue")
Signed-off-by: Arpit Saini <arpit.saini@xxxxxxxxxxxxxxxx>
---
drivers/gpu/drm/msm/dsi/phy/dsi_phy.c | 132 +++++++++++++++++++++++++++++++---
drivers/gpu/drm/msm/dsi/phy/dsi_phy.h | 4 ++
2 files changed, 127 insertions(+), 9 deletions(-)
Hi,
is this supposed to fix the message: "mdss_ahb_clk status stuck at 'on'"
during suspending?
--
Regards,
Alexey Minnekhanov