Skip to contentSkip to conversation

drm/bridge: sii902x: Fix HDMI detection with DRM_BRIDGE_ATTACH_NO_CONNECTOR

PATCH Superseded Devarsh Thakkar 2 participants 2 messages Oct 3, 2025 – Oct 4, 2025

Subsystems (3)

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: sii902x: Fix HDMI detection with DRM_BRIDGE_ATTACH_NO_CONNECTOR

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")
---
 drivers/gpu/drm/bridge/sii902x.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/sii902x.c +6 -2
index d537b1d036fb..3d169b9fac70 100644
@@ -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;
 }
 
Signature · 1 line
2.39.1
#1 lore raw
Quoted 21 lines · Devarsh Thakkar

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")
---
 drivers/gpu/drm/bridge/sii902x.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
drivers/gpu/drm/bridge/sii902x.c +0 -0
index d537b1d036fb..3d169b9fac70 100644
@@ -292,10 +292,16 @@ static const struct drm_edid *sii902x_edid_read(struct sii902x *sii902x,
 						struct drm_connector *connector)
 {

drivers/gpu/drm/bridge/sii902x.c static const struct drm_edid *sii902x_edid_read(struct sii902x *sii902x, · line 303

Quoted 10 lines
drivers/gpu/drm/bridge/sii902x.c +5 -0
 	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.

Quoted 16 lines
drivers/gpu/drm/bridge/sii902x.c +1 -2
+	}
 
 	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;
 }
 
Signature · 1 line
2.39.1
Signature · 2 lines
With best wishes
Dmitry