[PATCH RFC 2/2] drm/bridge: samsung-dsim: move clk setup to enable
Jan Remmet
j.remmet at phytec.de
Thu Sep 25 04:35:56 PDT 2025
Move the samsung_dsim_init and so samsung_dsim_enable_clock to
samsung_dsim_atomic_enable.
The base clocks may not be ready when pre_enable is called.
commit c9b1150a68d9 ("drm/atomic-helper: Re-order bridge chain pre-enable
and post-disable") points out that pre_enable hook definition says that
"The display pipe (i.e. clocks and timing signals) feeding this bridge
will not yet be running when this callback is called".
Signed-off-by: Jan Remmet <j.remmet at phytec.de>
---
drivers/gpu/drm/bridge/samsung-dsim.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
index b5dd71f6a99057d98cf15090f6081d0460836ec5..53ce3228586ac0f6abfa252b7c15d9eba459c96c 100644
--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -1460,6 +1460,14 @@ static void samsung_dsim_atomic_pre_enable(struct drm_bridge *bridge,
}
dsi->state |= DSIM_STATE_ENABLED;
+}
+
+static void samsung_dsim_atomic_enable(struct drm_bridge *bridge,
+ struct drm_atomic_state *state)
+{
+ pr_debug("%s called from %pS\n", __func__, __builtin_return_address(0));
+ struct samsung_dsim *dsi = bridge_to_dsi(bridge);
+ int ret;
/*
* For Exynos-DSIM the downstream bridge, or panel are expecting
@@ -1470,12 +1478,6 @@ static void samsung_dsim_atomic_pre_enable(struct drm_bridge *bridge,
if (ret)
return;
}
-}
-
-static void samsung_dsim_atomic_enable(struct drm_bridge *bridge,
- struct drm_atomic_state *state)
-{
- struct samsung_dsim *dsi = bridge_to_dsi(bridge);
samsung_dsim_set_display_mode(dsi);
samsung_dsim_set_display_enable(dsi, true);
--
2.43.0
More information about the linux-arm-kernel
mailing list