From: Aradhya Bhatia <a-bhatia1@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
Jan Kiszka <jan.kiszka@siemens.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Cc: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] drm/bridge: tc358767: Fix link properties discovery
Date: Tue, 31 Oct 2023 21:32:51 +0530 [thread overview]
Message-ID: <a3985aca-c5a9-c0e9-f30d-79ba0196e094@ti.com> (raw)
In-Reply-To: <20231031-tc358767-v1-2-392081ad9f4b@ideasonboard.com>
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@siemens.com>
> Closes: https://lore.kernel.org/all/24282420-b4dd-45b3-bb1c-fc37fe4a8205@siemens.com/
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> ---
Thank you, Tomi, for quickly debugging this!
Reviewed-by: Aradhya Bhatia <a-bhatia1@ti.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);
> }
>
next prev parent reply other threads:[~2023-10-31 18:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-31 13:26 [PATCH 0/2] drm/bridge: tc358767: Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR case Tomi Valkeinen
2023-10-31 13:26 ` [PATCH 1/2] drm/bridge: tc358767: Support input format negotiation hook Tomi Valkeinen
2023-10-31 13:26 ` [PATCH 2/2] drm/bridge: tc358767: Fix link properties discovery Tomi Valkeinen
2023-10-31 16:02 ` Aradhya Bhatia [this message]
2023-10-31 17:59 ` [PATCH 0/2] drm/bridge: tc358767: Fix DRM_BRIDGE_ATTACH_NO_CONNECTOR case Jan Kiszka
2023-12-15 13:33 ` Jan Kiszka
2023-12-19 10:00 ` Tomi Valkeinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a3985aca-c5a9-c0e9-f30d-79ba0196e094@ti.com \
--to=a-bhatia1@ti.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=jan.kiszka@siemens.com \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®