mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/4] video: dw_mipi_dsi: disable the panel before powering down the host
@ 2026-11-08 10:10 Ahmad Fatoum
  2026-11-08 10:10 ` [PATCH 2/4] video: dw_mipi_dsi: refuse transfers while the host is powered down Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Ahmad Fatoum @ 2026-11-08 10:10 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

VPL_DISABLE powered down the DSI host first and only then passed the
ioctl on to the panel. The DCS commands the panel sends on disable,
e.g. display off and sleep in for the OTM8009A, thus went into a host
held in reset and never reached the panel.

Linux disables the panel before the host's post_disable, so let's do
the same and forward VPL_DISABLE to the panel first.

Fixes: 11331c15e5bd ("video: add Designware MIPI-DSI support")
Signed-off-by: Ahmad Fatoum <a.fatoum@barebox.org>
---
 drivers/video/dw_mipi_dsi.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/video/dw_mipi_dsi.c b/drivers/video/dw_mipi_dsi.c
index bf95b1b9f6ff..b6a53844edec 100644
--- a/drivers/video/dw_mipi_dsi.c
+++ b/drivers/video/dw_mipi_dsi.c
@@ -906,6 +906,7 @@ 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 = {};
+	int ret;
 
 	switch (cmd) {
 	case VPL_ENABLE:
@@ -913,8 +914,10 @@ static int dw_mipi_dsi_ioctl(struct vpl *vpl, unsigned int port,
 		dw_mipi_dsi_set_mode(dsi, MIPI_DSI_MODE_VIDEO);
 		break;
 	case VPL_DISABLE:
+		/* The panel may still need the link to send its disable commands */
+		ret = vpl_bridge_ioctl(dsi->panel_bridge, cmd, data);
 		dw_mipi_dsi_bridge_post_atomic_disable(dsi);
-		break;
+		return ret;
 	case VPL_PREPARE:
 		/*
 		 * We store this to simplify debugging by allowing:
-- 
2.47.3




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-09  9:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 3/4] video: dw_mipi_dsi: give transfers in video mode a frame to complete Ahmad Fatoum
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox