From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 3/4] video: dw_mipi_dsi: give transfers in video mode a frame to complete
Date: Sun, 8 Nov 2026 11:10:53 +0100 [thread overview]
Message-ID: <20261108101110.1270196-3-a.fatoum@barebox.org> (raw)
In-Reply-To: <20261108101110.1270196-1-a.fatoum@barebox.org>
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@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
next prev parent reply other threads:[~2026-11-08 10:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-08 10:10 [PATCH 1/4] video: dw_mipi_dsi: disable the panel before powering down the host Ahmad Fatoum
2026-11-08 10:10 ` [PATCH 2/4] video: dw_mipi_dsi: refuse transfers while the host is powered down Ahmad Fatoum
2026-11-08 10:10 ` Ahmad Fatoum [this message]
2026-11-08 10:10 ` [PATCH 4/4] commands: mipi_dsi: add command for easier DCS experimentation Ahmad Fatoum
2026-11-09 9:24 ` Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261108101110.1270196-3-a.fatoum@barebox.org \
--to=a.fatoum@barebox.org \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox