1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00
openmptcprouter/6.12/target/linux/bcm27xx/patches-6.12/950-0637-drm-vc4-dsi-Clocks-should-be-running-before-reset.patch
Ycarus (Yannick Chabanois) bdb9b0046f Add bcm27xx 6.12 test support
2024-12-20 14:17:26 +01:00

60 lines
1.8 KiB
Diff

From 083e5c4d246f0bebd8ba33e7ebecc24594e2e25a Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
Date: Wed, 8 Jun 2022 17:23:47 +0100
Subject: [PATCH 637/697] drm: vc4: dsi: Clocks should be running before reset
The initialisation sequence differs slightly from the documentation
in that the clocks are meant to be running before resets and
similar.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
---
drivers/gpu/drm/vc4/vc4_dsi.c | 30 +++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)
--- a/drivers/gpu/drm/vc4/vc4_dsi.c
+++ b/drivers/gpu/drm/vc4/vc4_dsi.c
@@ -931,6 +931,21 @@ static void vc4_dsi_bridge_pre_enable(st
"Failed to set phy clock to %ld: %d\n", phy_clock, ret);
}
+ ret = clk_prepare_enable(dsi->escape_clock);
+ if (ret) {
+ drm_err(bridge->dev, "Failed to turn on DSI escape clock: %d\n",
+ ret);
+ return;
+ }
+
+ ret = clk_prepare_enable(dsi->pll_phy_clock);
+ if (ret) {
+ drm_err(bridge->dev, "Failed to turn on DSI PLL: %d\n", ret);
+ return;
+ }
+
+ hs_clock = clk_get_rate(dsi->pll_phy_clock);
+
/* Reset the DSI and all its fifos. */
DSI_PORT_WRITE(CTRL,
DSI_CTRL_SOFT_RESET_CFG |
@@ -989,21 +1004,6 @@ static void vc4_dsi_bridge_pre_enable(st
mdelay(1);
}
- ret = clk_prepare_enable(dsi->escape_clock);
- if (ret) {
- drm_err(bridge->dev, "Failed to turn on DSI escape clock: %d\n",
- ret);
- return;
- }
-
- ret = clk_prepare_enable(dsi->pll_phy_clock);
- if (ret) {
- drm_err(bridge->dev, "Failed to turn on DSI PLL: %d\n", ret);
- return;
- }
-
- hs_clock = clk_get_rate(dsi->pll_phy_clock);
-
/* Yes, we set the DSI0P/DSI1P pixel clock to the byte rate,
* not the pixel clock rate. DSIxP take from the APHY's byte,
* DDR2, or DDR4 clock (we use byte) and feed into the PV at