From: Devarsh Thakkar <devarsht@ti.com>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
<andrzej.hajda@intel.com>, <neil.armstrong@linaro.org>,
<rfoss@kernel.org>, <airlied@gmail.com>,
<maarten.lankhorst@linux.intel.com>, <mripard@kernel.org>,
<tzimmermann@suse.de>, <dri-devel@lists.freedesktop.org>,
<jani.nikula@intel.com>, <simona@ffwll.ch>,
<linux-kernel@vger.kernel.org>,
<dmitry.baryshkov@oss.qualcomm.com>
Cc: <praneeth@ti.com>, <vigneshr@ti.com>, <aradhya.bhatia@linux.dev>,
<s-jain1@ti.com>, <s-wang12@ti.com>, <r-donadkar@ti.com>,
<h-shenoy@ti.com>
Subject: Re: [PATCH v3] drm/bridge: sii902x: Fix HDMI detection with DRM_BRIDGE_ATTACH_NO_CONNECTOR
Date: Thu, 23 Oct 2025 19:48:52 +0530 [thread overview]
Message-ID: <e00495db-4cb0-4a24-ad58-39d22c6a36cc@ti.com> (raw)
In-Reply-To: <3f026b8c-d917-4197-b7f8-51ef3355aca7@ideasonboard.com>
Hi Tomi,
On 22/10/25 12:19, Tomi Valkeinen wrote:
> Hi,
>
Thanks for the review.
> On 07/10/2025 14:23, Devarsh Thakkar wrote:
>> The SII902x HDMI bridge driver wasn't working properly with drivers that
>> use the newer bridge connector architecture with the
>> DRM_BRIDGE_ATTACH_NO_CONNECTOR flag, like TIDSS. This caused HDMI audio to
>> fail since the driver wasn't properly setting the sink_is_hdmi flag when
>> the bridge was attached without a connector since .get_modes() is never
>> called in this case. Fix it by setting sink_is_hdmi flag when reading
>> the EDID block itself.
>>
>> Fixes: 3de47e1309c2 ("drm/bridge: sii902x: use display info is_hdmi")
>> Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
>> ---
>> V3: Use drm_edid_connector_update without edid NULL check
>> V2: Use drm_edid_connector_update to detect HDMI
>>
>> Link to V2:
>> https://lore.kernel.org/all/20251006150714.3144368-1-devarsht@ti.com/
>> Link to V1:
>> https://lore.kernel.org/all/20251003143642.4072918-1-devarsht@ti.com/
>>
>> drivers/gpu/drm/bridge/sii902x.c | 5 ++---
>> 1 file changed, 2 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
>> index d537b1d036fb..bb613d4c281f 100644
>> --- a/drivers/gpu/drm/bridge/sii902x.c
>> +++ b/drivers/gpu/drm/bridge/sii902x.c
>> @@ -296,6 +296,8 @@ static const struct drm_edid *sii902x_edid_read(struct sii902x *sii902x,
>> mutex_lock(&sii902x->mutex);
>>
>> drm_edid = drm_edid_read_ddc(connector, sii902x->i2cmux->adapter[0]);
>> + drm_edid_connector_update(connector, drm_edid);
>> + sii902x->sink_is_hdmi = connector->display_info.is_hdmi;
>>
>> mutex_unlock(&sii902x->mutex);
>
> I'm not sure if this is right. If I'm not mistaken, the
> drm_bridge_connector.c calls sii902x_edid_read, and then does a
> drm_edid_connector_update(). So drm_edid_connector_update() will be
> called twice, and also, I don't think the bridge should be updating
> connector's data when using DRM_BRIDGE_ATTACH_NO_CONNECTOR.
>
Thanks for catching this!. I missed out to catch this while addressing
previous review comment.
> Maybe either drop sink_is_hdmi, and just look at
> connector->display_info.is_hdmi, or if that doesn't work for some
> reason, just get the "is-hdmi" flag from the edid data directly.
>
Yes I plan to drop sink_is_hdmi flag altogether and directly use
connector->display_info.is_hdmi in v4.
I think we should be able to use
drm_atomic_get_new_connector_for_encoder in .atomic_enable to get the
connector->display_info.is_hdmi and this should work for both the legacy
and DISPLAY_BRIDGE_ATTACH_NO_CONNECTOR scenarios and set the output mode
accordingly. I will try out with this approach.
Kindly let me know if any concerns with above approach.
Regards
Devarsh
> Tomi
>
>> @@ -309,14 +311,11 @@ static int sii902x_get_modes(struct drm_connector *connector)
>> int num = 0;
>>
>> drm_edid = sii902x_edid_read(sii902x, connector);
>> - drm_edid_connector_update(connector, drm_edid);
>> if (drm_edid) {
>> num = drm_edid_connector_add_modes(connector);
>> drm_edid_free(drm_edid);
>> }
>>
>> - sii902x->sink_is_hdmi = connector->display_info.is_hdmi;
>> -
>> return num;
>> }
>>
>
prev parent reply other threads:[~2025-10-23 14:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 11:23 Devarsh Thakkar
2025-10-08 20:18 ` Dmitry Baryshkov
2025-10-09 15:09 ` Devarsh Thakkar
2025-10-17 15:12 ` Devarsh Thakkar
2025-10-22 6:49 ` Tomi Valkeinen
2025-10-23 14:18 ` Devarsh Thakkar [this message]
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=e00495db-4cb0-4a24-ad58-39d22c6a36cc@ti.com \
--to=devarsht@ti.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=aradhya.bhatia@linux.dev \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=h-shenoy@ti.com \
--cc=jani.nikula@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=praneeth@ti.com \
--cc=r-donadkar@ti.com \
--cc=rfoss@kernel.org \
--cc=s-jain1@ti.com \
--cc=s-wang12@ti.com \
--cc=simona@ffwll.ch \
--cc=tomi.valkeinen@ideasonboard.com \
--cc=tzimmermann@suse.de \
--cc=vigneshr@ti.com \
/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®