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]
Message-ID: <YqG0bfNNiF+1dY36@aptenodytes>
Date:   Thu, 9 Jun 2022 10:50:53 +0200
From:   Paul Kocialkowski <paul.kocialkowski@...tlin.com>
To:     quentin.schulz@...obroma-systems.com
Cc:     devicetree@...r.kernel.org, airlied@...ux.ie,
        linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
        Quentin Schulz <foss+kernel@...il.net>, robh+dt@...nel.org,
        thierry.reding@...il.com, sam@...nborg.org
Subject: Re: [PATCH 1/3] drm/panel: ltk050h3146w: add
 mipi_dsi_device.mode_flags to of_match_data

Hi,

On Mon 31 Jan 22, 17:47, quentin.schulz@...obroma-systems.com wrote:
> From: Quentin Schulz <quentin.schulz@...obroma-systems.com>
> 
> To prepare for a new display to be supported by this driver which has a
> slightly different set of DSI mode related flags, let's move the
> currently hardcoded mode flags to the .data field of of_device_id
> structure.
> 
> Cc: Quentin Schulz <foss+kernel@...il.net>
> Signed-off-by: Quentin Schulz <quentin.schulz@...obroma-systems.com>

LGTM:

Reviewed-by: Paul Kocialkowski <paul.kocialkowski@...tlin.com>

Cheers,

Paul

> ---
>  drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c
> index a5a414920430..67eb474e28c6 100644
> --- a/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c
> +++ b/drivers/gpu/drm/panel/panel-leadtek-ltk050h3146w.c
> @@ -25,6 +25,7 @@ struct ltk050h3146w_cmd {
>  
>  struct ltk050h3146w;
>  struct ltk050h3146w_desc {
> +	const unsigned long mode_flags;
>  	const struct drm_display_mode *mode;
>  	int (*init)(struct ltk050h3146w *ctx);
>  };
> @@ -339,6 +340,8 @@ static const struct drm_display_mode ltk050h3146w_mode = {
>  static const struct ltk050h3146w_desc ltk050h3146w_data = {
>  	.mode = &ltk050h3146w_mode,
>  	.init = ltk050h3146w_init_sequence,
> +	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
> +		MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET,
>  };
>  
>  static int ltk050h3146w_a2_select_page(struct ltk050h3146w *ctx, int page)
> @@ -433,6 +436,8 @@ static const struct drm_display_mode ltk050h3146w_a2_mode = {
>  static const struct ltk050h3146w_desc ltk050h3146w_a2_data = {
>  	.mode = &ltk050h3146w_a2_mode,
>  	.init = ltk050h3146w_a2_init_sequence,
> +	.mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
> +		MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET,
>  };
>  
>  static int ltk050h3146w_unprepare(struct drm_panel *panel)
> @@ -592,8 +597,7 @@ static int ltk050h3146w_probe(struct mipi_dsi_device *dsi)
>  
>  	dsi->lanes = 4;
>  	dsi->format = MIPI_DSI_FMT_RGB888;
> -	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
> -			  MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET;
> +	dsi->mode_flags = ctx->panel_desc->mode_flags;
>  
>  	drm_panel_init(&ctx->panel, &dsi->dev, &ltk050h3146w_funcs,
>  		       DRM_MODE_CONNECTOR_DSI);
> -- 
> 2.34.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com

Download attachment "signature.asc" of type "application/pgp-signature" (489 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ