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: <3045292e-5801-74c5-5a6b-6e4c5802a035@linaro.org>
Date:   Tue, 16 May 2023 09:25:28 +0200
From:   Neil Armstrong <neil.armstrong@...aro.org>
To:     Aradhya Bhatia <a-bhatia1@...com>,
        Tomi Valkeinen <tomba@...nel.org>,
        Jyri Sarha <jyri.sarha@....fi>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Andrzej Hajda <andrzej.hajda@...el.com>,
        Robert Foss <rfoss@...nel.org>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Rahul T R <r-ravikumar@...com>,
        Swapnil Jakhade <sjakhade@...ence.com>,
        Boris Brezillon <boris.brezillon@...labora.com>,
        Francesco Dolcini <francesco@...cini.it>
Cc:     DRI Development List <dri-devel@...ts.freedesktop.org>,
        Linux Kernel List <linux-kernel@...r.kernel.org>,
        Nishanth Menon <nm@...com>,
        Vignesh Raghavendra <vigneshr@...com>,
        Devarsh Thakkar <devarsht@...com>,
        Jayesh Choudhary <j-choudhary@...com>
Subject: Re: [PATCH v6 2/8] drm/bridge: tfp410: Set input_bus_flags in
 atomic_check

On 09/05/2023 11:30, Aradhya Bhatia wrote:
> From: Nikhil Devshatwar <nikhil.nd@...com>
> 
> input_bus_flags are specified in drm_bridge_timings (legacy) as well
> as drm_bridge_state->input_bus_cfg.flags
> 
> The flags from the timings will be deprecated. Bridges are supposed
> to validate and set the bridge state flags from atomic_check.
> 
> Implement atomic_check hook for the same.
> 
> Signed-off-by: Nikhil Devshatwar <nikhil.nd@...com>
> ---
> 
> Notes:
>      changes from v4:
>      * fix a warning Reported-by: kernel test robot <lkp@...el.com>
> 
>      changes from v5:
>      * Moved the return statement here from patch 4 (where it was added
>        by mistake).
> 
>   drivers/gpu/drm/bridge/ti-tfp410.c | 16 ++++++++++++++++
>   1 file changed, 16 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/ti-tfp410.c b/drivers/gpu/drm/bridge/ti-tfp410.c
> index 7dacc7e03eee..631ae8f11a77 100644
> --- a/drivers/gpu/drm/bridge/ti-tfp410.c
> +++ b/drivers/gpu/drm/bridge/ti-tfp410.c
> @@ -228,6 +228,21 @@ static u32 *tfp410_get_input_bus_fmts(struct drm_bridge *bridge,
>   	return input_fmts;
>   }
>   
> +static int tfp410_atomic_check(struct drm_bridge *bridge,
> +			       struct drm_bridge_state *bridge_state,
> +			       struct drm_crtc_state *crtc_state,
> +			       struct drm_connector_state *conn_state)
> +{
> +	struct tfp410 *dvi = drm_bridge_to_tfp410(bridge);
> +
> +	/*
> +	 * There might be flags negotiation supported in future.
> +	 * Set the bus flags in atomic_check statically for now.
> +	 */
> +	bridge_state->input_bus_cfg.flags = dvi->timings.input_bus_flags;

A newline here before return would look better

> +	return 0;
> +}
> +
>   static const struct drm_bridge_funcs tfp410_bridge_funcs = {
>   	.attach		= tfp410_attach,
>   	.detach		= tfp410_detach,
> @@ -238,6 +253,7 @@ static const struct drm_bridge_funcs tfp410_bridge_funcs = {
>   	.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
>   	.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
>   	.atomic_get_input_bus_fmts = tfp410_get_input_bus_fmts,
> +	.atomic_check = tfp410_atomic_check,
>   };
>   
>   static const struct drm_bridge_timings tfp410_default_timings = {

With that fixed:

Reviewed-by: Neil Armstrong <neil.armstrong@...aro.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ