Hi,

On Thu, Dec 4, 2025 at 12:27 AM Amin GATTOUT <[email protected]> wrote:
>
> Update the driver to use the non-deprecated mipi_dsi_*_multi()
> helpers, as recommended in Documentation/gpu/todo.rst. The multi
> variants provide proper error accumulation and handle the required
> DCS NOP insertions, which suits the OTM8009A command sequences.
>
> The init and disable paths now return dsi_ctx.accum_err, ensuring
> errors are propagated to callers.
>
> Signed-off-by: Amin GATTOUT <[email protected]>
> ---
>  .../gpu/drm/panel/panel-orisetech-otm8009a.c  | 56 ++++++-------------
>  1 file changed, 17 insertions(+), 39 deletions(-)
>
> diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c 
> b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> index a0f58c3b73f6..fe31f508efd6 100644
> --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c
> @@ -113,9 +113,9 @@ static void otm8009a_dcs_write_buf(struct otm8009a *ctx, 
> const void *data,
>                                    size_t len)
>  {
>         struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
> +       struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
>
> -       if (mipi_dsi_dcs_write_buffer(dsi, data, len) < 0)
> -               dev_warn(ctx->dev, "mipi dsi dcs write buffer failed\n");
> +       mipi_dsi_dcs_write_buffer_multi(&dsi_ctx, data, len);
>  }

IMO, otm8009a_dcs_write_buf() should be changed to take in the "struct
mipi_dsi_multi_context". Then it should be passed in all the way from
calliers. So dcs_write_seq() and dcs_write_cmd_at() should also take
the "struct mipi_dsi_multi_context" instead of a "struct otm8009a".

Once you do this, you'll also want to change more of the mdelay()
calls to mipi_dsi_msleep() or mipi_dsi_usleep_range().

-Doug

Reply via email to