* [PATCH] drm/panel: ronbo-rb070d30: Use mipi_dsi_*_multi() functions
@ 2026-09-29 8:01 Hsieh Hung-En
2026-09-29 16:29 ` Doug Anderson
0 siblings, 1 reply; 2+ messages in thread
From: Hsieh Hung-En @ 2026-09-29 8:01 UTC (permalink / raw)
To: neil.armstrong, jesszhan0024, dianders
Cc: dri-devel, linux-kernel, maarten.lankhorst, mripard, tzimmermann,
airlied, simona, Hsieh Hung-En
Replace the deprecated mipi_dsi_dcs_exit_sleep_mode() and
mipi_dsi_dcs_enter_sleep_mode() calls in the enable and disable callbacks
with their _multi variants, as suggested in Documentation/gpu/todo.rst.
The callbacks retain the same return values. The new helpers additionally
log an error if the command fails.
Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com>
---
Notes:
Compile-tested on arm64 with W=1; not tested on hardware.
drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
index c3fbc459c..ebe6352db 100644
--- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
+++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
@@ -75,15 +75,19 @@ static int rb070d30_panel_unprepare(struct drm_panel *panel)
static int rb070d30_panel_enable(struct drm_panel *panel)
{
struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
- return mipi_dsi_dcs_exit_sleep_mode(ctx->dsi);
+ mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
+ return dsi_ctx.accum_err;
}
static int rb070d30_panel_disable(struct drm_panel *panel)
{
struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
+ struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
- return mipi_dsi_dcs_enter_sleep_mode(ctx->dsi);
+ mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
+ return dsi_ctx.accum_err;
}
/* Default timings */
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] drm/panel: ronbo-rb070d30: Use mipi_dsi_*_multi() functions
2026-09-29 8:01 [PATCH] drm/panel: ronbo-rb070d30: Use mipi_dsi_*_multi() functions Hsieh Hung-En
@ 2026-09-29 16:29 ` Doug Anderson
0 siblings, 0 replies; 2+ messages in thread
From: Doug Anderson @ 2026-09-29 16:29 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 1:02 AM Hsieh Hung-En <hungen3108@gmail.com> wrote:
>
> Replace the deprecated mipi_dsi_dcs_exit_sleep_mode() and
> mipi_dsi_dcs_enter_sleep_mode() calls in the enable and disable callbacks
> with their _multi variants, as suggested in Documentation/gpu/todo.rst.
>
> The callbacks retain the same return values. The new helpers additionally
> log an error if the command fails.
>
> Signed-off-by: Hsieh Hung-En <hungen3108@gmail.com>
> ---
>
> Notes:
> Compile-tested on arm64 with W=1; not tested on hardware.
>
> drivers/gpu/drm/panel/panel-ronbo-rb070d30.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
_multi doesn't buy us much here, but this is still something we want
to do so we can (eventually) remove the old functions. Thus:
Reviewed-by: Douglas Anderson <dianders@chromium.org>
I'll be at a conference next week and will probably wait until I get
back before applying, just in case there are problems. So unless
someone else applies in the meantime (or other issues come up), I'll
try to land in ~2 weeks.
> diff --git a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> index c3fbc459c..ebe6352db 100644
> --- a/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> +++ b/drivers/gpu/drm/panel/panel-ronbo-rb070d30.c
> @@ -75,15 +75,19 @@ static int rb070d30_panel_unprepare(struct drm_panel *panel)
> static int rb070d30_panel_enable(struct drm_panel *panel)
> {
> struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
>
> - return mipi_dsi_dcs_exit_sleep_mode(ctx->dsi);
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> + return dsi_ctx.accum_err;
> }
>
> static int rb070d30_panel_disable(struct drm_panel *panel)
> {
> struct rb070d30_panel *ctx = panel_to_rb070d30_panel(panel);
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
>
> - return mipi_dsi_dcs_enter_sleep_mode(ctx->dsi);
> + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
> + return dsi_ctx.accum_err;
> }
nit: not new for your change, but it's probably better if
rb070d30_panel_disable() ignores the error here and always returns 0.
We often ignore errors in disable(), especially when unprepare() will
power the panel off anyway. If you wanted to send a followup patch
fixing that, it would be nice. ;-)
-Doug
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-29 16:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-29 8:01 [PATCH] drm/panel: ronbo-rb070d30: Use mipi_dsi_*_multi() functions Hsieh Hung-En
2026-09-29 16:29 ` 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®