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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a3985aca-c5a9-c0e9-f30d-79ba0196e094@ti.com>
Date:   Tue, 31 Oct 2023 21:32:51 +0530
From:   Aradhya Bhatia <a-bhatia1@...com>
To:     Tomi Valkeinen <tomi.valkeinen@...asonboard.com>,
        Jan Kiszka <jan.kiszka@...mens.com>,
        Andrzej Hajda <andrzej.hajda@...el.com>,
        Neil Armstrong <neil.armstrong@...aro.org>,
        Robert Foss <rfoss@...nel.org>,
        Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
        Jonas Karlman <jonas@...boo.se>,
        Jernej Skrabec <jernej.skrabec@...il.com>,
        Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
        Maxime Ripard <mripard@...nel.org>,
        Thomas Zimmermann <tzimmermann@...e.de>,
        David Airlie <airlied@...il.com>,
        Daniel Vetter <daniel@...ll.ch>
CC:     <dri-devel@...ts.freedesktop.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] drm/bridge: tc358767: Fix link properties discovery



On 31-Oct-23 18:56, Tomi Valkeinen wrote:
> When a display controller driver uses DRM_BRIDGE_ATTACH_NO_CONNECTOR,
> tc358767 will behave properly and skip the creation of the connector.
> 
> However, tc_get_display_props(), which is used to find out about the DP
> monitor and link, is only called from two places: .atomic_enable() and
> tc_connector_get_modes(). The latter is only used when tc358767 creates
> its own connector, i.e. when DRM_BRIDGE_ATTACH_NO_CONNECTOR is _not_
> set.
> 
> Thus, the driver never finds out the link properties before get_edid()
> is called. With num_lanes of 0 and link_rate of 0 there are not many
> valid modes...
> 
> Fix this by adding tc_connector_get_modes() call at the beginning of
> get_edid(), so that we have up to date information before looking at the
> modes.
> 
> Reported-by: Jan Kiszka <jan.kiszka@...mens.com>
> Closes: https://lore.kernel.org/all/24282420-b4dd-45b3-bb1c-fc37fe4a8205@siemens.com/
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
> ---

Thank you, Tomi, for quickly debugging this!

Reviewed-by: Aradhya Bhatia <a-bhatia1@...com>

Regards
Aradhya

>  drivers/gpu/drm/bridge/tc358767.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
> index 0affcefdeb1c..137a9f5e3cad 100644
> --- a/drivers/gpu/drm/bridge/tc358767.c
> +++ b/drivers/gpu/drm/bridge/tc358767.c
> @@ -1579,6 +1579,13 @@ static struct edid *tc_get_edid(struct drm_bridge *bridge,
>  				struct drm_connector *connector)
>  {
>  	struct tc_data *tc = bridge_to_tc(bridge);
> +	int ret;
> +
> +	ret = tc_get_display_props(tc);
> +	if (ret < 0) {
> +		dev_err(tc->dev, "failed to read display props: %d\n", ret);
> +		return 0;
> +	}
>  
>  	return drm_get_edid(connector, &tc->aux.ddc);
>  }
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ