Re: [PATCH v3] drm/panel: novatek-nt36523: transition to mipi_dsi wrapped functions

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

 



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 <tejasvipin76@xxxxxxxxx>
> ---
> 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-tejasvipin76@xxxxxxxxx/
> 
> 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-tejasvipin76@xxxxxxxxx/
> ---
>  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



[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