[PATCH 3/4] video: dw_mipi_dsi: give transfers in video mode a frame to complete

Ahmad Fatoum a.fatoum at barebox.org
Sun Nov 8 02:10:53 PST 2026


Once the host is in video mode, DCS reads and long writes that don't
fit into the horizontal blanking are deferred to the vertical blanking,
so they can take up to a frame.

On the STM32MP157C-DK2 at 49 Hz, i.e. 20 ms per frame, a DCS read took
up to 17.3 ms and a 13 byte write up to 19.9 ms depending on when in
the frame it was issued, and the occasional read failed with "Timeout
during read operation".

Raise the timeout to 100 ms, which covers a frame down to 10 Hz. This
also covers the init sequence of panels like the ST7703, which is sent
on enable, after the host has switched to video mode.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 drivers/video/dw_mipi_dsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index c936463261a5..a61a454be989 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -221,7 +221,8 @@
 #define MAX_RD_TIME_V131(lbcc)		((lbcc) & 0x7fff)
 
 #define PHY_STATUS_TIMEOUT_US		10000
-#define CMD_PKT_STATUS_TIMEOUT_US	20000
+/* in video mode, LP transfers may wait for the blanking of the next frame */
+#define CMD_PKT_STATUS_TIMEOUT_US	100000
 
 enum vpg_mode {
 	VPG_DISABLED,
-- 
2.47.3




More information about the barebox mailing list