Re: [PATCH v2 1/2] drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable()
From: David Heidelberg
Date: Wed Dec 02 2026 - 11:54:07 EST
On 02/12/2026 04:33, Doug Anderson wrote:
Hi,
On Thu, Nov 26, 2026 at 11:57 AM David Heidelberg via B4 Relay
<devnull+david.ixit.cz@xxxxxxxxxx> wrote:
From: Guido Günther <agx@xxxxxxxxxxx>
With prepare_prev_first set, DRM calls visionox_rm69299_unprepare()
after the display controller timing engine has been stopped and before
the DSI host bridge post_disable() resets the video engine. Sending the
display-off and enter-sleep DCS commands from unprepare() therefore
causes DSI timeouts on every screen blank/unblank on the SHIFT6mq:
dmesg:
msm_dsi ae94000.dsi: [drm:dsi_cmds2buf_tx] *ERROR* wait for video done timed out
dsi_cmds2buf_tx: cmd dma tx failed, type=0x5, data0=0x28, len=4, ret=-110
panel-visionox-rm69299 ae94000.dsi.0: sending DCS SET_DISPLAY_OFF failed: -110
Move the display-off and enter-sleep DCS commands into a new disable()
callback so they execute while the DSI link is still active, while
keeping the power-on and initialization commands in prepare() where the
link is in LP11 before video starts.
Fixes: 4a92ef0c57df ("drm/panel: visionox-rm69299: Make use of prepare_prev_first")
Signed-off-by: Guido Günther <agx@xxxxxxxxxxx>
[David: keep power-on and init commands in prepare() per v1 review]
Signed-off-by: David Heidelberg <david@xxxxxxx>
---
drivers/gpu/drm/panel/panel-visionox-rm69299.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
index 4309e04c35c4b..bca1004656e45 100644
--- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c
+++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
@@ -184,30 +184,37 @@ static int visionox_rm69299_power_on(struct visionox_rm69299 *ctx)
static int visionox_rm69299_power_off(struct visionox_rm69299 *ctx)
{
gpiod_set_value(ctx->reset_gpio, 0);
return regulator_bulk_disable(ARRAY_SIZE(visionox_rm69299_supplies),
ctx->supplies);
}
-static int visionox_rm69299_unprepare(struct drm_panel *panel)
+static int visionox_rm69299_disable(struct drm_panel *panel)
{
struct visionox_rm69299 *ctx = panel_to_ctx(panel);
struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
ctx->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
/* 120ms delay required here as per DCS spec */
mipi_dsi_msleep(&dsi_ctx, 120);
mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+ return dsi_ctx.accum_err;
The above should be `return 0;`. The old code didn't consider it a
fatal error if mipi_dsi_dcs_set_display_off_multi() and
mipi_dsi_dcs_enter_sleep_mode_multi() failed. You shouldn't either.
The best you can do is continue on and try to power off.
Good point, thanks. I'll be in v3.
David