[PATCH RFC 3/7] drm/panel: ilitek-ili9882t: use wrapped MIPI DCS functions

Doug Anderson dianders at chromium.org
Fri May 10 21:46:16 UTC 2024


Hi,

On Thu, May 9, 2024 at 3:37 PM Dmitry Baryshkov
<dmitry.baryshkov at linaro.org> wrote:
>
> @@ -424,20 +420,14 @@ static inline struct ili9882t *to_ili9882t(struct drm_panel *panel)
>
>  static int ili9882t_enter_sleep_mode(struct ili9882t *ili)
>  {
> -       struct mipi_dsi_device *dsi = ili->dsi;
> -       int ret;
> -
> -       dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
> +       struct mipi_dsi_multi_context ctx = { .dsi = ili->dsi };
>
> -       ret = mipi_dsi_dcs_set_display_off(dsi);
> -       if (ret < 0)
> -               return ret;
> +       ili->dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
>
> -       ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
> -       if (ret < 0)
> -               return ret;
> +       mipi_dsi_dcs_set_display_off_multi(&ctx);
> +       mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
>
> -       return 0;
> +       return ctx.accum_err;
>  }

nit: Same comments I had on patch #2 (boe-tv101wum-nl6) about inlining
this to the caller. Here it's even better since the caller already has
a multi_context...

In any case:

Reviewed-by: Douglas Anderson <dianders at chromium.org>


More information about the dri-devel mailing list