* [PATCH] drm/bridge: sii902x: Fix HDMI detection with DRM_BRIDGE_ATTACH_NO_CONNECTOR
@ 2025-10-03 14:36 Devarsh Thakkar
2025-10-04 9:53 ` Dmitry Baryshkov
0 siblings, 1 reply; 2+ messages in thread
From: Devarsh Thakkar @ 2025-10-03 14:36 UTC (permalink / raw)
To: andrzej.hajda, neil.armstrong, rfoss, airlied, maarten.lankhorst,
mripard, tzimmermann, dri-devel, simona, linux-kernel
Cc: tomi.valkeinen, jani.nikula, praneeth, vigneshr, aradhya.bhatia,
s-jain1, s-wang12, r-donadkar, h-shenoy, devarsht
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>
---
drivers/gpu/drm/bridge/sii902x.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index d537b1d036fb..3d169b9fac70 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -292,10 +292,16 @@ static const struct drm_edid *sii902x_edid_read(struct sii902x *sii902x,
struct drm_connector *connector)
{
const struct drm_edid *drm_edid;
+ const struct edid *edid;
mutex_lock(&sii902x->mutex);
drm_edid = drm_edid_read_ddc(connector, sii902x->i2cmux->adapter[0]);
+ if (drm_edid) {
+ edid = drm_edid_raw(drm_edid);
+ if (edid && drm_detect_hdmi_monitor(edid))
+ sii902x->sink_is_hdmi = true;
+ }
mutex_unlock(&sii902x->mutex);
@@ -315,8 +321,6 @@ static int sii902x_get_modes(struct drm_connector *connector)
drm_edid_free(drm_edid);
}
- sii902x->sink_is_hdmi = connector->display_info.is_hdmi;
-
return num;
}
--
2.39.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/bridge: sii902x: Fix HDMI detection with DRM_BRIDGE_ATTACH_NO_CONNECTOR
2025-10-03 14:36 [PATCH] drm/bridge: sii902x: Fix HDMI detection with DRM_BRIDGE_ATTACH_NO_CONNECTOR Devarsh Thakkar
@ 2025-10-04 9:53 ` Dmitry Baryshkov
0 siblings, 0 replies; 2+ messages in thread
From: Dmitry Baryshkov @ 2025-10-04 9:53 UTC (permalink / raw)
To: Devarsh Thakkar
Cc: andrzej.hajda, neil.armstrong, rfoss, airlied, maarten.lankhorst,
mripard, tzimmermann, dri-devel, simona, linux-kernel,
tomi.valkeinen, jani.nikula, praneeth, vigneshr, aradhya.bhatia,
s-jain1, s-wang12, r-donadkar, h-shenoy
On Fri, Oct 03, 2025 at 08:06:42PM +0530, 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>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index d537b1d036fb..3d169b9fac70 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -292,10 +292,16 @@ static const struct drm_edid *sii902x_edid_read(struct sii902x *sii902x,
> struct drm_connector *connector)
> {
> const struct drm_edid *drm_edid;
> + const struct edid *edid;
>
> mutex_lock(&sii902x->mutex);
>
> drm_edid = drm_edid_read_ddc(connector, sii902x->i2cmux->adapter[0]);
> + if (drm_edid) {
> + edid = drm_edid_raw(drm_edid);
> + if (edid && drm_detect_hdmi_monitor(edid))
> + sii902x->sink_is_hdmi = true;
Just call drm_edid_connector_update() here. The drm_edid_raw() has a
very nice comment:
* This is for transition only. Avoid using this like the plague.
And we really need to convert the bridge to the HDMI helpers.
> + }
>
> mutex_unlock(&sii902x->mutex);
>
> @@ -315,8 +321,6 @@ static int sii902x_get_modes(struct drm_connector *connector)
> drm_edid_free(drm_edid);
> }
>
> - sii902x->sink_is_hdmi = connector->display_info.is_hdmi;
> -
> return num;
> }
>
> --
> 2.39.1
>
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-10-04 9:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-03 14:36 [PATCH] drm/bridge: sii902x: Fix HDMI detection with DRM_BRIDGE_ATTACH_NO_CONNECTOR Devarsh Thakkar
2025-10-04 9:53 ` Dmitry Baryshkov
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®