Re: [PATCH] drm/panel/synaptics-r63353: Use _multi variants

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Mar 13, 2025 at 9:47 PM Anusha Srivatsa <asrivats@xxxxxxxxxx> wrote:
>
> @@ -181,24 +162,15 @@ static int r63353_panel_prepare(struct drm_panel *panel)
>  static int r63353_panel_deactivate(struct r63353_panel *rpanel)
>  {
>         struct mipi_dsi_device *dsi = rpanel->dsi;
> -       struct device *dev = &dsi->dev;
> -       int ret;
> +       struct mipi_dsi_multi_context dsi_ctx = { .dsi = dsi };
>
> -       ret = mipi_dsi_dcs_set_display_off(dsi);
> -       if (ret < 0) {
> -               dev_err(dev, "Failed to set display OFF (%d)\n", ret);
> -               return ret;
> -       }
> +       mipi_dsi_dcs_set_display_off_multi(&dsi_ctx);
>
> -       usleep_range(5000, 10000);
> +       mipi_dsi_usleep_range(&dsi_ctx, 5000, 10000);
>
> -       ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
> -       if (ret < 0) {
> -               dev_err(dev, "Failed to enter sleep mode (%d)\n", ret);
> -               return ret;
> -       }
> +       mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx);
>
> -       return 0;
> +       return dsi_ctx.accum_err;

nit: the one caller of r63353_panel_deactivate() doesn't actually look
at the error code, so this could be a function that returns "void".
That was true even before your patch, though. I wouldn't mind a
followup patch that fixed this. ;-)

In any case, the patch looks reasonable to me now.

Reviewed-by: Douglas Anderson <dianders@xxxxxxxxxxxx>

Happy for someone else to apply it if they want. If not, I'll snooze
this for ~a week to give others a chance to comment and then plan to
push to drm-misc-next.


-Doug




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux