From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH 3/3] video: dw_mipi_dsi: activate pattern generator during enable as a hack
Date: Mon, 1 Dec 2025 09:59:23 +0100 [thread overview]
Message-ID: <20251201085927.1306364-3-a.fatoum@barebox.org> (raw)
In-Reply-To: <20251201085927.1306364-1-a.fatoum@barebox.org>
There's still something fishy with the initialization sequence of the
video pipeline with respect to the MIPI-DSI bridge.
As a workaround, jump start the pipeline by briefly enabling the video
pattern generator and disabling it again.
This will lead to a very brief flash of colored bars until that issue is
better understood and properly resolved.
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
drivers/video/dw_mipi_dsi.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index bf95b1b9f6ff..681d939e17ea 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -906,9 +906,20 @@ static int dw_mipi_dsi_ioctl(struct vpl *vpl, unsigned int port,
{
struct dw_mipi_dsi *dsi = container_of(vpl, struct dw_mipi_dsi, vpl);
struct drm_display_mode mode = {};
+ bool vpg_enable_hack;
+ int ret;
+
+ /*
+ * HACK: If Video Pattern Generator is not running here, the panel
+ * initialization on the Sitronix ST7703 (RGB30-Panel) times out...
+ * FIXME: figure out why Linux doesn't suffer from this
+ */
+ vpg_enable_hack = true;
switch (cmd) {
case VPL_ENABLE:
+ if (vpg_enable_hack)
+ dsi->vpg_mode = VPG_COLORS_V;
/* Switch to video mode for panel-bridge enable & panel enable */
dw_mipi_dsi_set_mode(dsi, MIPI_DSI_MODE_VIDEO);
break;
@@ -934,7 +945,14 @@ static int dw_mipi_dsi_ioctl(struct vpl *vpl, unsigned int port,
/* Probes should have occured by now */
WARN_ON(!dsi->panel_bridge);
- return vpl_bridge_ioctl(dsi->panel_bridge, cmd, data);
+ ret = vpl_bridge_ioctl(dsi->panel_bridge, cmd, data);
+
+ if (cmd == VPL_ENABLE && vpg_enable_hack) {
+ dsi->vpg_mode = VPG_DISABLED;
+ vpg_param_set(NULL, dsi);
+ }
+
+ return ret;
}
static const char *vpg_modes[] = {
--
2.47.3
next prev parent reply other threads:[~2025-12-01 9:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 8:59 [PATCH 1/3] video: dw_mipi_dsi: drop unused and misleading dw_mipi_dsi_crtc_node() Ahmad Fatoum
2025-12-01 8:59 ` [PATCH 2/3] video: Rockchip: add MIPI-DSI support Ahmad Fatoum
2025-12-01 8:59 ` Ahmad Fatoum [this message]
2025-12-01 10:44 ` [PATCH 1/3] video: dw_mipi_dsi: drop unused and misleading dw_mipi_dsi_crtc_node() 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=20251201085927.1306364-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