mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Ahmad Fatoum <a.fatoum@barebox.org>
To: barebox@lists.infradead.org
Cc: Ahmad Fatoum <a.fatoum@barebox.org>
Subject: [PATCH master 2/2] video: dw_mipi_dsi: remove VPG workaround for panel initialization
Date: Fri, 13 Feb 2026 10:28:09 +0100	[thread overview]
Message-ID: <20260213092906.3960051-2-a.fatoum@barebox.org> (raw)
In-Reply-To: <20260213092906.3960051-1-a.fatoum@barebox.org>

The Video Pattern Generator was being temporarily enabled during
VPL_ENABLE to work around panel initialization timeouts on the Sitronix
ST7703 of the Powkiddy RGB30. The root cause was a sync polarity
that has been fixed in the previous commit, so this hack can now go away.

This fixes a regression for the STM32MP157C-DK2: Enabling the VPG at the
point we did, caused the panel to synchronize to a wrong start offset and
led to a funny effect with the barebox logo that's shown by default:

On subsequent reboots, the display output would start at different
locations and so the logo would wander around and because the color
format is RGB888, the hexagon inside the barebox logo b would keep
switching between red, green and blue.

Fixes: 5115bff30153 ("video: dw_mipi_dsi: activate pattern generator during enable as a hack")
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 drivers/video/dw_mipi_dsi.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index 681d939e17ea..bf95b1b9f6ff 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -906,20 +906,9 @@ 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;
@@ -945,14 +934,7 @@ static int dw_mipi_dsi_ioctl(struct vpl *vpl, unsigned int port,
 	/* Probes should have occured by now */
 	WARN_ON(!dsi->panel_bridge);
 
-	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;
+	return vpl_bridge_ioctl(dsi->panel_bridge, cmd, data);
 }
 
 static const char *vpg_modes[] = {
-- 
2.47.3




      reply	other threads:[~2026-02-13  9:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-13  9:28 [PATCH master 1/2] video: mode-helpers: preserve sync polarity in fb_videomode conversion Ahmad Fatoum
2026-02-13  9:28 ` Ahmad Fatoum [this message]

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=20260213092906.3960051-2-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