[PATCH RESEND 2/3] drm/verisilicon: disable the output before enabling it
From: Icenowy Zheng
Date: Fri Oct 30 2026 - 09:35:16 EST
When either of the RUNNING bits are set, change to some timing
parameters won't take effect.
This will lead to failure of the first modeset done by the kernel, if
the bootloader sets a different mode and keeps the display running
before it.
Flip these RUNNING bits off before setting it on to fix this problem.
Fixes: dbf21777caa8 ("drm: verisilicon: add a driver for Verisilicon display controllers")
Signed-off-by: Icenowy Zheng <zhengxingda@xxxxxxxxxxx>
---
drivers/gpu/drm/verisilicon/vs_bridge.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/verisilicon/vs_bridge.c b/drivers/gpu/drm/verisilicon/vs_bridge.c
index dc7c85b07fe32..a095b20e81c00 100644
--- a/drivers/gpu/drm/verisilicon/vs_bridge.c
+++ b/drivers/gpu/drm/verisilicon/vs_bridge.c
@@ -162,6 +162,14 @@ static void vs_bridge_enable_common(struct vs_crtc *crtc,
VSDC_DISP_PANEL_CONFIG_DE_EN |
VSDC_DISP_PANEL_CONFIG_DAT_EN |
VSDC_DISP_PANEL_CONFIG_CLK_EN);
+
+ /* Disable it first to prevent stale hardware state */
+ regmap_clear_bits(dc->regs, VSDC_DISP_PANEL_START,
+ VSDC_DISP_PANEL_START_MULTI_DISP_SYNC |
+ VSDC_DISP_PANEL_START_RUNNING(output));
+ regmap_clear_bits(dc->regs, VSDC_DISP_PANEL_CONFIG(output),
+ VSDC_DISP_PANEL_CONFIG_RUNNING);
+
regmap_set_bits(dc->regs, VSDC_DISP_PANEL_CONFIG(output),
VSDC_DISP_PANEL_CONFIG_RUNNING);
regmap_clear_bits(dc->regs, VSDC_DISP_PANEL_START,
--
2.56.0