Hi,

On Sun, May 10, 2026 at 09:14:49PM +0200, Javier Martinez Canillas wrote:
> Currently, the driver assumes that the connector sink type is always HDMI
> and configures the IT66121 bridge appropriately. But configuring in this
> mode and enabling the transmission of AVI infoframe packets can cause DVI
> monitors to fail parsing the video signal.
> 
> To prevent this, store the connector display information sink type in the
> bridge atomic state and use it to decide whether the bridge should be set
> in HDMI or DVI mode, and if the AVI infoframes packets should be sent.
> 
> Assisted-by: Cursor:claude-4.6-opus
> Signed-off-by: Javier Martinez Canillas <[email protected]>
> ---
> 
>  drivers/gpu/drm/bridge/ite-it66121.c | 68 ++++++++++++++++++----------
>  1 file changed, 44 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/gpu/drm/bridge/ite-it66121.c 
> b/drivers/gpu/drm/bridge/ite-it66121.c
> index a203c94a27e5..99088277d170 100644
> --- a/drivers/gpu/drm/bridge/ite-it66121.c
> +++ b/drivers/gpu/drm/bridge/ite-it66121.c
> @@ -322,6 +322,7 @@ static inline struct it66121_ctx 
> *bridge_to_it66121_ctx(struct drm_bridge *bridg
>  
>  struct it66121_bridge_state {
>       struct drm_bridge_state base;
> +     bool sink_is_hdmi;
>  };
>  
>  static inline struct it66121_bridge_state *
> @@ -790,6 +791,14 @@ static int it66121_bridge_check(struct drm_bridge 
> *bridge,
>                               struct drm_connector_state *conn_state)
>  {
>       struct it66121_ctx *ctx = bridge_to_it66121_ctx(bridge);
> +     struct it66121_bridge_state *state =
> +             to_it66121_bridge_state(bridge_state);
> +
> +     /* Default to HDMI to preserve legacy behavior. */
> +     state->sink_is_hdmi = true;
> +
> +     if (conn_state && conn_state->connector)
> +             state->sink_is_hdmi = 
> conn_state->connector->display_info.is_hdmi;

It's really not clear to me why you need to have that in the bridge
state. What's wrong with using drm_display_info.is_hdmi directly?

If you really want to rework the driver though, switch to HDMI state
helpers would fix all of it :)

Maxime

Attachment: signature.asc
Description: PGP signature

Reply via email to