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 6, 2025

Subsystems (3)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 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")

---
V2: Use drm_edid_connector_update to detect HDMI as suggested

Link to V1:
https://lore.kernel.org/all/[email protected]/

---
 drivers/gpu/drm/bridge/sii902x.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/bridge/sii902x.c +4 -3
index d537b1d036fb..d36466d73385 100644
@@ -296,6 +296,10 @@ 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]);
+	if (drm_edid) {
+		drm_edid_connector_update(connector, drm_edid);
+		sii902x->sink_is_hdmi = connector->display_info.is_hdmi;
+	}
 
 	mutex_unlock(&sii902x->mutex);
 
@@ -309,14 +313,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;
 }
 
Signature · 1 line
2.39.1
#1 lore raw
Quoted 24 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")

---
V2: Use drm_edid_connector_update to detect HDMI as suggested

Link to V1:
https://lore.kernel.org/all/[email protected]/

---
 drivers/gpu/drm/bridge/sii902x.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/bridge/sii902x.c +0 -0
index d537b1d036fb..d36466d73385 100644

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

Quoted 5 lines
drivers/gpu/drm/bridge/sii902x.c +2 -0
@@ -296,6 +296,10 @@ 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]);
+	if (drm_edid) {
+		drm_edid_connector_update(connector, drm_edid);

Mmmh, as a rule, you should do drm_edid_connector_update() even if it's NULL to reset all the previous stuff.

BR,
Jani.

Quoted 19 lines
drivers/gpu/drm/bridge/sii902x.c +2 -3
+		sii902x->sink_is_hdmi = connector->display_info.is_hdmi;
+	}
 
 	mutex_unlock(&sii902x->mutex);
 
@@ -309,14 +313,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;
 }
Signature · 1 line
Jani Nikula, Intel