[PATCH v3 13/16] drm: sprd: always initialize DPU registers

Otto Pflüger otto.pflueger at abscue.de
Thu Jul 31 15:51:26 UTC 2025


When the Unisoc DRM driver is initialized for the first time to display
an image on the screen, reinitialize the display controller properly
instead of relying on the bootloader to have set up a configuration that
also works with this driver.

Signed-off-by: Otto Pflüger <otto.pflueger at abscue.de>
---
 drivers/gpu/drm/sprd/sprd_dpu.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/gpu/drm/sprd/sprd_dpu.c b/drivers/gpu/drm/sprd/sprd_dpu.c
index 978d4947e1bc5cd5b13b1f25719268fa08b77297..b946d015133db44d2d3d0b18803ed887b2b7ae2e 100644
--- a/drivers/gpu/drm/sprd/sprd_dpu.c
+++ b/drivers/gpu/drm/sprd/sprd_dpu.c
@@ -456,6 +456,14 @@ static void sprd_dpu_init(struct sprd_dpu *dpu)
 	}
 
 	writel(int_mask, ctx->base + REG_DPU_INT_EN);
+
+	/*
+	 * The DPU is usually enabled by the bootloader to show
+	 * a splash screen. Stop it here when the kernel initializes
+	 * the display.
+	 */
+	if (!ctx->stopped)
+		sprd_dpu_stop(dpu);
 }
 
 static void sprd_dpu_fini(struct sprd_dpu *dpu)

-- 
2.50.0


More information about the dri-devel mailing list