drm/panel: ronbo-rb070d30: Ignore DCS errors in disable()
Subsystems (3)
PATCH 1/1 drm/panel: ronbo-rb070d30: Ignore DCS errors in disable()
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().
---
Notes:
This applies on top of:
https://lore.kernel.org/all/[email protected]/
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(-)
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +1 -1
@@ -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 */
Signature · 1 line
2.43.0
Hi,
Quoted 30 lines · Hsieh Hung-En
If
rb070d30_panel_disable()returns an error,drm_panel_disable()skips clearingpanel->enabled.unprepare()still powers the panel off, but the nextdrm_panel_enable()sees the panel as already enabled and does nothing, so the panel stays dark.Always return 0 from
disable(). A failedENTER_SLEEP_MODEis still logged bymipi_dsi_dcs_enter_sleep_mode_multi().Suggested-by Douglas Anderson <[email protected]>Signed-off-by Hsieh Hung-En <[email protected]>---
Notes:
This applies on top of:
https://lore.kernel.org/all/[email protected]/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(-)drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +0
-0
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c static int rb070d30_panel_disable(struct drm_panel *panel) · line 91
Quoted 6 lines
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c +1
-1@@ -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