Re: [PATCH 2/3] drm/panel: raydium-rm68200: Use mipi_dsi_*_multi() functions
From: Doug Anderson
Date: Thu Oct 29 2026 - 23:28:26 EST
Hi,
On Wed, Oct 14, 2026 at 6:50 AM Hsieh Hung-En <hungen3108@xxxxxxxxx> wrote:
>
> @@ -258,6 +256,7 @@ static int rm68200_prepare(struct drm_panel *panel)
> {
> struct rm68200 *ctx = panel_to_rm68200(panel);
> struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
> + struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
> int ret;
>
> ret = regulator_enable(ctx->supply);
> @@ -275,19 +274,15 @@ static int rm68200_prepare(struct drm_panel *panel)
>
> rm68200_init_sequence(ctx);
I think you also want to pass the dsi_ctx to the
rm68200_init_sequence() and eventually use it to replace the
mipi_dsi_dcs_write_buffer() / mipi_dsi_dcs_write() with their multi
variants too, don't you?
Oh, I see. You did this in the next patch. I would have just mashed
them together into one...
> - ret = mipi_dsi_dcs_exit_sleep_mode(dsi);
> - if (ret)
> - return ret;
> + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
>
> - msleep(125);
> + mipi_dsi_msleep(&dsi_ctx, 125);
>
> - ret = mipi_dsi_dcs_set_display_on(dsi);
> - if (ret)
> - return ret;
> + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
>
> - msleep(20);
> + mipi_dsi_msleep(&dsi_ctx, 20);
>
> - return 0;
> + return dsi_ctx.accum_err;
Similar to patch #1 (and what Sashiko pointed out): we really should
be turning off regulators and deasserting GPIOs here.
There's a bunch of small things here, though everything is
preexisting. As I've said, I wouldn't mind a v2, but if a week passes
and I don't see anything, I'll probably apply.
-Doug