On Sun, Mar 09, 2025 at 09:33:55AM +0530, Tejas Vipin wrote:
> Changes the novatek-nt36523 panel to use multi style functions for
> improved error handling.
> 
> Signed-off-by: Tejas Vipin <tejasvipi...@gmail.com>
> ---
> Changes in v3:
>     - Remove mipi_dsi_dual_msleep
>     - Change mipi_dsi_dual_dcs_write_seq_multi to use the same dsi_ctx
>       by swapping the dsi accordingly.
> 
> Link to v2: 
> https://lore.kernel.org/all/20250307091519.245889-1-tejasvipi...@gmail.com/
> 
> Changes in v2:
>     - Uses mipi_dsi_dual_msleep
>     - Changed mipi_dsi_dual_dcs_write_seq_multi to not equate accum_err
>       of either dsi_ctx.
> 
> Link to v1: 
> https://lore.kernel.org/all/20250306134350.139792-1-tejasvipi...@gmail.com/
> ---
>  drivers/gpu/drm/panel/panel-novatek-nt36523.c | 1681 ++++++++---------
>  1 file changed, 821 insertions(+), 860 deletions(-)


[..]

> 
> @@ -1063,18 +1026,16 @@ static int nt36523_prepare(struct drm_panel *panel)
>  static int nt36523_disable(struct drm_panel *panel)
>  {
>       struct panel_info *pinfo = to_panel_info(panel);
> -     int i, ret;
> +     int i;
>  
>       for (i = 0; i < DSI_NUM_MIN + pinfo->desc->is_dual_dsi; i++) {
> -             ret = mipi_dsi_dcs_set_display_off(pinfo->dsi[i]);
> -             if (ret < 0)
> -                     dev_err(&pinfo->dsi[i]->dev, "failed to set display 
> off: %d\n", ret);
> +             mipi_dsi_dcs_set_display_off_multi(

-:1726: CHECK:OPEN_ENDED_LINE: Lines should not end with a '('
#1726: FILE: drivers/gpu/drm/panel/panel-novatek-nt36523.c:1032:
+               mipi_dsi_dcs_set_display_off_multi(

> +                     &(struct mipi_dsi_multi_context){.dsi = pinfo->dsi[i]});
>       }
>  
>       for (i = 0; i < DSI_NUM_MIN + pinfo->desc->is_dual_dsi; i++) {
> -             ret = mipi_dsi_dcs_enter_sleep_mode(pinfo->dsi[i]);
> -             if (ret < 0)
> -                     dev_err(&pinfo->dsi[i]->dev, "failed to enter sleep 
> mode: %d\n", ret);
> +             mipi_dsi_dcs_enter_sleep_mode_multi(

Same here. I think it might be cleaner to define a variable of struct
mipi_dsi_multi_context type and pass it here.

> +                     &(struct mipi_dsi_multi_context){.dsi = pinfo->dsi[i]});
>       }
>  
>       msleep(70);
> -- 
> 2.48.1
> 

-- 
With best wishes
Dmitry

Reply via email to