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 <[email protected]>
> ---
> 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