lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 2 Jan 2023 19:55:49 +0100
From:   Sam Ravnborg <sam@...nborg.org>
To:     Javier Martinez Canillas <javierm@...hat.com>
Cc:     linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        Thierry Reding <thierry.reding@...il.com>
Subject: Re: [PATCH 07/14] drm/panel-novatek-nt35950: Drop custom DSI write
 macro

On Wed, Dec 28, 2022 at 02:47:50AM +0100, Javier Martinez Canillas wrote:
> There is a macro for this already in the <drm/drm_mipi_dsi.h> header, use
> that instead and delete the custom DSI write macro defined in the driver.
> 
> Signed-off-by: Javier Martinez Canillas <javierm@...hat.com>
Reviewed-by: Sam Ravnborg <sam@...nborg.org>
> ---
> 
>  drivers/gpu/drm/panel/panel-novatek-nt35950.c | 14 +++-----------
>  1 file changed, 3 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
> index 3a844917da07..abf752b36a52 100644
> --- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
> +++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
> @@ -89,14 +89,6 @@ static inline struct nt35950 *to_nt35950(struct drm_panel *panel)
>  	return container_of(panel, struct nt35950, panel);
>  }
>  
> -#define dsi_dcs_write_seq(dsi, seq...) do {				\
> -		static const u8 d[] = { seq };				\
> -		int ret;						\
> -		ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d));	\
> -		if (ret < 0)						\
> -			return ret;					\
> -	} while (0)
> -
>  static void nt35950_reset(struct nt35950 *nt)
>  {
>  	gpiod_set_value_cansleep(nt->reset_gpio, 1);
> @@ -338,7 +330,7 @@ static int nt35950_on(struct nt35950 *nt)
>  		return ret;
>  
>  	/* Unknown command */
> -	dsi_dcs_write_seq(dsi, 0xd4, 0x88, 0x88);
> +	mipi_dsi_dcs_write_seq(dsi, 0xd4, 0x88, 0x88);
>  
>  	/* CMD2 Page 7 */
>  	ret = nt35950_set_cmd2_page(nt, 7);
> @@ -346,10 +338,10 @@ static int nt35950_on(struct nt35950 *nt)
>  		return ret;
>  
>  	/* Enable SubPixel Rendering */
> -	dsi_dcs_write_seq(dsi, MCS_PARAM_SPR_EN, 0x01);
> +	mipi_dsi_dcs_write_seq(dsi, MCS_PARAM_SPR_EN, 0x01);
>  
>  	/* SPR Mode: YYG Rainbow-RGB */
> -	dsi_dcs_write_seq(dsi, MCS_PARAM_SPR_MODE, MCS_SPR_MODE_YYG_RAINBOW_RGB);
> +	mipi_dsi_dcs_write_seq(dsi, MCS_PARAM_SPR_MODE, MCS_SPR_MODE_YYG_RAINBOW_RGB);
>  
>  	/* CMD3 */
>  	ret = nt35950_inject_black_image(nt);
> -- 
> 2.38.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ