* [PATCH v2 0/2] drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable()
@ 2026-11-26 19:57 David Heidelberg via B4 Relay
2026-11-26 19:57 ` [PATCH v2 1/2] " David Heidelberg via B4 Relay
2026-11-26 19:57 ` [PATCH v2 2/2] drm/panel: visionox-rm69299: Move power_off() into unprepare() David Heidelberg via B4 Relay
0 siblings, 2 replies; 6+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-26 19:57 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson
Cc: Guido Günther, Alexander Martinz, Dmitry Baryshkov,
dri-devel, linux-kernel, phone-devel, David Heidelberg
On video-mode MSM DSI hosts with prepare_prev_first set, panel
unprepare() runs after the DPU timing engine has been disabled and
before the DSI host bridge post_disable() resets the video engine.
Sending DCS SET_DISPLAY_OFF in unprepare() therefore times out on every
screen blank/unblank on the SHIFT6mq:
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 only the display-off / enter-sleep DCS commands from unprepare()
into disable() while keeping the power-on and initialization sequence in
prepare() (where the link is in LP11 before video starts), and fold
power_off() into unprepare().
---
Changes in v2:
- Keep power-on and init DSI commands in prepare() instead of moving
them to enable() (Neil, Dmitry).
- Only fold visionox_rm69299_power_off() into unprepare(), keeping
visionox_rm69299_power_on() for prepare() (Neil Armstrong).
- Verified on SHIFT6mq across repeated blank/unblank and
backlight cycles with zero DSI timeouts and no stuck disp_cc clocks.
- Link to v1: https://patch.msgid.link/20260427-visionox-rm69299-enable-v1-0-fa7d62d26d87@sigxcpu.org
---
Guido Günther (2):
drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable()
drm/panel: visionox-rm69299: Move power_off() into unprepare()
drivers/gpu/drm/panel/panel-visionox-rm69299.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
---
base-commit: 909ef7a9a30fa139e69e555e3606680f5cca7726
change-id: 20260427-visionox-rm69299-enable-06f3d736f664
Best regards,
--
David Heidelberg <david@ixit.cz>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable()
2026-11-26 19:57 [PATCH v2 0/2] drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable() David Heidelberg via B4 Relay
@ 2026-11-26 19:57 ` David Heidelberg via B4 Relay
2026-12-02 3:33 ` Doug Anderson
2026-11-26 19:57 ` [PATCH v2 2/2] drm/panel: visionox-rm69299: Move power_off() into unprepare() David Heidelberg via B4 Relay
1 sibling, 1 reply; 6+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-26 19:57 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson
Cc: Guido Günther, Alexander Martinz, Dmitry Baryshkov,
dri-devel, linux-kernel, phone-devel, David Heidelberg
From: Guido Günther <agx@sigxcpu.org>
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@sigxcpu.org>
[David: keep power-on and init commands in prepare() per v1 review]
Signed-off-by: David Heidelberg <david@ixit.cz>
---
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;
+}
+
+static int visionox_rm69299_unprepare(struct drm_panel *panel)
+{
+ struct visionox_rm69299 *ctx = panel_to_ctx(panel);
+
return visionox_rm69299_power_off(ctx);
}
static int visionox_rm69299_prepare(struct drm_panel *panel)
{
struct visionox_rm69299 *ctx = panel_to_ctx(panel);
struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
int ret, i;
@@ -277,16 +284,17 @@ static int visionox_rm69299_get_modes(struct drm_panel *panel,
connector->display_info.height_mm = 131;
mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
drm_mode_probed_add(connector, mode);
return 1;
}
static const struct drm_panel_funcs visionox_rm69299_drm_funcs = {
+ .disable = visionox_rm69299_disable,
.unprepare = visionox_rm69299_unprepare,
.prepare = visionox_rm69299_prepare,
.get_modes = visionox_rm69299_get_modes,
};
static int visionox_rm69299_bl_get_brightness(struct backlight_device *bl)
{
struct mipi_dsi_device *dsi = bl_get_data(bl);
--
2.55.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] drm/panel: visionox-rm69299: Move power_off() into unprepare()
2026-11-26 19:57 [PATCH v2 0/2] drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable() David Heidelberg via B4 Relay
2026-11-26 19:57 ` [PATCH v2 1/2] " David Heidelberg via B4 Relay
@ 2026-11-26 19:57 ` David Heidelberg via B4 Relay
2026-12-02 3:33 ` Doug Anderson
1 sibling, 1 reply; 6+ messages in thread
From: David Heidelberg via B4 Relay @ 2026-11-26 19:57 UTC (permalink / raw)
To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson
Cc: Guido Günther, Alexander Martinz, Dmitry Baryshkov,
dri-devel, linux-kernel, phone-devel, David Heidelberg
From: Guido Günther <agx@sigxcpu.org>
No need to have a separate visionox_rm69299_power_off() helper now that
visionox_rm69299_unprepare() only handles powering off the panel.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
[David: only fold power_off() into unprepare(), keeping power_on() in prepare()]
Signed-off-by: David Heidelberg <david@ixit.cz>
---
drivers/gpu/drm/panel/panel-visionox-rm69299.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-visionox-rm69299.c b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
index bca1004656e45..54005d4660c33 100644
--- a/drivers/gpu/drm/panel/panel-visionox-rm69299.c
+++ b/drivers/gpu/drm/panel/panel-visionox-rm69299.c
@@ -176,24 +176,16 @@ static int visionox_rm69299_power_on(struct visionox_rm69299 *ctx)
gpiod_set_value(ctx->reset_gpio, 0);
usleep_range(10000, 20000);
gpiod_set_value(ctx->reset_gpio, 1);
usleep_range(10000, 20000);
return 0;
}
-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_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);
@@ -205,17 +197,20 @@ static int visionox_rm69299_disable(struct drm_panel *panel)
return dsi_ctx.accum_err;
}
static int visionox_rm69299_unprepare(struct drm_panel *panel)
{
struct visionox_rm69299 *ctx = panel_to_ctx(panel);
- return visionox_rm69299_power_off(ctx);
+ gpiod_set_value(ctx->reset_gpio, 0);
+
+ return regulator_bulk_disable(ARRAY_SIZE(visionox_rm69299_supplies),
+ ctx->supplies);
}
static int visionox_rm69299_prepare(struct drm_panel *panel)
{
struct visionox_rm69299 *ctx = panel_to_ctx(panel);
struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
int ret, i;
--
2.55.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable()
2026-11-26 19:57 ` [PATCH v2 1/2] " David Heidelberg via B4 Relay
@ 2026-12-02 3:33 ` Doug Anderson
2026-12-02 16:53 ` David Heidelberg
0 siblings, 1 reply; 6+ messages in thread
From: Doug Anderson @ 2026-12-02 3:33 UTC (permalink / raw)
To: david
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Guido Günther, Alexander Martinz, Dmitry Baryshkov,
dri-devel, linux-kernel, phone-devel
Hi,
On Thu, Nov 26, 2026 at 11:57 AM David Heidelberg via B4 Relay
<devnull+david.ixit.cz@kernel.org> wrote:
>
> From: Guido Günther <agx@sigxcpu.org>
>
> 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@sigxcpu.org>
> [David: keep power-on and init commands in prepare() per v1 review]
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] drm/panel: visionox-rm69299: Move power_off() into unprepare()
2026-11-26 19:57 ` [PATCH v2 2/2] drm/panel: visionox-rm69299: Move power_off() into unprepare() David Heidelberg via B4 Relay
@ 2026-12-02 3:33 ` Doug Anderson
0 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2026-12-02 3:33 UTC (permalink / raw)
To: david
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Guido Günther, Alexander Martinz, Dmitry Baryshkov,
dri-devel, linux-kernel, phone-devel
Hi,
On Thu, Nov 26, 2026 at 11:57 AM David Heidelberg via B4 Relay
<devnull+david.ixit.cz@kernel.org> wrote:
>
> From: Guido Günther <agx@sigxcpu.org>
>
> No need to have a separate visionox_rm69299_power_off() helper now that
> visionox_rm69299_unprepare() only handles powering off the panel.
>
> Signed-off-by: Guido Günther <agx@sigxcpu.org>
> [David: only fold power_off() into unprepare(), keeping power_on() in prepare()]
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> drivers/gpu/drm/panel/panel-visionox-rm69299.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
Seems OK to me.
Reviewed-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable()
2026-12-02 3:33 ` Doug Anderson
@ 2026-12-02 16:53 ` David Heidelberg
0 siblings, 0 replies; 6+ messages in thread
From: David Heidelberg @ 2026-12-02 16:53 UTC (permalink / raw)
To: Doug Anderson
Cc: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter,
Guido Günther, Alexander Martinz, Dmitry Baryshkov,
dri-devel, linux-kernel, phone-devel
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@kernel.org> wrote:
>>
>> From: Guido Günther <agx@sigxcpu.org>
>>
>> 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@sigxcpu.org>
>> [David: keep power-on and init commands in prepare() per v1 review]
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>> 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
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-12-02 16:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-26 19:57 [PATCH v2 0/2] drm/panel: visionox-rm69299: Move off/sleep DSI commands to disable() David Heidelberg via B4 Relay
2026-11-26 19:57 ` [PATCH v2 1/2] " David Heidelberg via B4 Relay
2026-12-02 3:33 ` Doug Anderson
2026-12-02 16:53 ` David Heidelberg
2026-11-26 19:57 ` [PATCH v2 2/2] drm/panel: visionox-rm69299: Move power_off() into unprepare() David Heidelberg via B4 Relay
2026-12-02 3:33 ` Doug Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®