mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/panel: ronbo-rb070d30: Ignore DCS errors in disable()
@ 2026-09-30  1:30 Hsieh Hung-En
  2026-09-30 19:44 ` Doug Anderson
  0 siblings, 1 reply; 2+ messages in thread
From: Hsieh Hung-En @ 2026-09-30  1:30 UTC (permalink / raw)
  To: dianders, neil.armstrong, jesszhan0024
  Cc: dri-devel, linux-kernel, maarten.lankhorst, mripard, tzimmermann,
	airlied, simona, Hsieh Hung-En

If rb070d30_panel_disable() returns an error, drm_panel_disable() skips
clearing panel->enabled. unprepare() still powers the panel off, but the
next drm_panel_enable() sees the panel as already enabled and does
nothing, so the panel stays dark.

Always return 0 from disable(). A failed ENTER_SLEEP_MODE is still logged
by mipi_dsi_dcs_enter_sleep_mode_multi().

Suggested-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com>
---

Notes:
    This applies on top of:
    https://lore.kernel.org/all/20260929080143.559685-1-hungen3108@gmail.com/
    
    As suggested by Doug in:
    https://lore.kernel.org/all/CAD=FV=UU+NS0T-Ga8i12QKTNCYOu8kar_6=NsH0=4FVUFyKB7A@mail.gmail.com/
    
    Compile-tested on arm64 with W=1; not tested on hardware.

 drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
index ebe6352db..2d54182fe 100644
--- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
+++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
@@ -87,7 +87,7 @@ static int rb070d30_panel_disable(struct drm_panel *panel)
 	struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
 
 	mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
-	return dsi_ctx.accum_err;
+	return 0;
 }
 
 /* Default timings */
-- 
2.43.0


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

* Re: [PATCH] drm/panel: ronbo-rb070d30: Ignore DCS errors in disable()
  2026-09-30  1:30 [PATCH] drm/panel: ronbo-rb070d30: Ignore DCS errors in disable() Hsieh Hung-En
@ 2026-09-30 19:44 ` Doug Anderson
  0 siblings, 0 replies; 2+ messages in thread
From: Doug Anderson @ 2026-09-30 19:44 UTC (permalink / raw)
  To: Hsieh Hung-En
  Cc: neil.armstrong, jesszhan0024, dri-devel, linux-kernel,
	maarten.lankhorst, mripard, tzimmermann, airlied, simona

Hi,

On Tue, Sep 29, 2026 at 6:31 PM Hsieh Hung-En <hungen3108@gmail.com> wrote:
>
> If rb070d30_panel_disable() returns an error, drm_panel_disable() skips
> clearing panel->enabled. unprepare() still powers the panel off, but the
> next drm_panel_enable() sees the panel as already enabled and does
> nothing, so the panel stays dark.
>
> Always return 0 from disable(). A failed ENTER_SLEEP_MODE is still logged
> by mipi_dsi_dcs_enter_sleep_mode_multi().
>
> Suggested-by: Douglas Anderson <dianders@chromium.org>
> Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com>
> ---
>
> Notes:
>     This applies on top of:
>     https://lore.kernel.org/all/20260929080143.559685-1-hungen3108@gmail.com/
>
>     As suggested by Doug in:
>     https://lore.kernel.org/all/CAD=FV=UU+NS0T-Ga8i12QKTNCYOu8kar_6=NsH0=4FVUFyKB7A@mail.gmail.com/
>
>     Compile-tested on arm64 with W=1; not tested on hardware.
>
>  drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> index ebe6352db..2d54182fe 100644
> --- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> +++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> @@ -87,7 +87,7 @@ static int rb070d30_panel_disable(struct drm_panel *panel)
>         struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
>
>         mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
> -       return dsi_ctx.accum_err;
> +       return 0;
>  }

It's probably worth adding a comment explaining why we are purposely
ignoring the error value. Something about
mipi_dsi_dcs_enter_sleep_mode_multi() already having logged the error
and how a failure here shouldn't really block us continuing on to
unprepare to power the panel off.

-Doug

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

end of thread, other threads:[~2026-09-30 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-30  1:30 [PATCH] drm/panel: ronbo-rb070d30: Ignore DCS errors in disable() Hsieh Hung-En
2026-09-30 19:44 ` 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®