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: Tue, 28 May 2024 10:50:48 +0200
From: Michael Riesch <michael.riesch@...fvision.net>
To: Chen Ni <nichen@...as.ac.cn>, neil.armstrong@...aro.org,
 quic_jesszhan@...cinc.com, sam@...nborg.org,
 maarten.lankhorst@...ux.intel.com, mripard@...nel.org, tzimmermann@...e.de,
 airlied@...il.com, daniel@...ll.ch, sre@...nel.org
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/panel: sitronix-st7789v: Add check for
 of_drm_get_panel_orientation

Hi Chen Ni,

On 5/28/24 05:08, Chen Ni wrote:
> Add check for the return value of of_drm_get_panel_orientation() and
> return the error if it fails in order to catch the error.
> 
> Fixes: b27c0f6d208d ("drm/panel: sitronix-st7789v: add panel orientation support")
> Signed-off-by: Chen Ni <nichen@...as.ac.cn>
> ---
>  drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> index 88e80fe98112..8b15e225bf37 100644
> --- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
> @@ -643,7 +643,9 @@ static int st7789v_probe(struct spi_device *spi)
>  	if (ret)
>  		return dev_err_probe(dev, ret, "Failed to get backlight\n");
>  
> -	of_drm_get_panel_orientation(spi->dev.of_node, &ctx->orientation);
> +	ret = of_drm_get_panel_orientation(spi->dev.of_node, &ctx->orientation);
> +	if (ret)
> +		return dev_err_probe(&spi->dev, ret, "Failed to get orientation\n");
>  
>  	drm_panel_add(&ctx->panel);

I was worried that this effectively makes "rotation" a required property
(although it is not marked required in the bindings documentation) but
it turns out that of_drm_get_panel_orientation handles a missing
"rotation" property gracefully.

Also, all other panel drivers I checked handle the
of_drm_get_panel_orientation call as you suggested. Nice to see this
becoming aligned.

Reviewed-by: Michael Riesch <michael.riesch@...fvision.net>

Thanks and best regards,
Michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ