lede/target/linux/bcm27xx/patches-6.12/950-0634-drm-vc4-dsi-Clocks-should-be-running-before-reset.patch
=?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= d81c03f05e bcm27xx: add 6.12 patches from RPi repo
These patches were generated from:
https://github.com/raspberrypi/linux/commits/rpi-6.12.y
With the following command:
git format-patch -N v6.12.27..HEAD
(HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e)

Exceptions:
- (def)configs patches
- github workflows patches
- applied & reverted patches
- readme patches
- wireless patches

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2025-06-20 17:01:06 +08:00

61 lines
1.8 KiB
Diff

From 8331b1fe1bbc5840b2f02387cdffedafee5fb64d 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] 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