drm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type

The driver unconditionally sets the transmission mode to HDMI, which
leads to display output not working with DVI monitors. Check the
connector's display information sink type to identify the correct mode
to configure the bridge.

Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patch.msgid.link/20260523-it66121-fix-dvi-mode-v5-v5-3-33b4468162f9@redhat.com
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
This commit is contained in:
Javier Martinez Canillas 2026-05-23 12:41:00 +02:00
parent 4730eb08b9
commit fde6fa5a58
No known key found for this signature in database
GPG Key ID: C751E590D63F3D69

View File

@ -199,6 +199,7 @@
#define IT66121_HDMI_MODE_REG 0xC0
#define IT66121_HDMI_MODE_HDMI BIT(0)
#define IT66121_HDMI_MODE_DVI 0
#define IT66121_SYS_STATUS_REG 0x0E
#define IT66121_SYS_STATUS_ACTIVE_IRQ BIT(7)
@ -692,8 +693,10 @@ static void it66121_set_mode(struct it66121_ctx *ctx,
mutex_lock(&ctx->lock);
/* Set TX mode to HDMI */
if (regmap_write(ctx->regmap, IT66121_HDMI_MODE_REG, IT66121_HDMI_MODE_HDMI))
/* Set TX mode to HDMI or DVI */
if (regmap_write(ctx->regmap, IT66121_HDMI_MODE_REG,
connector->display_info.is_hdmi ?
IT66121_HDMI_MODE_HDMI : IT66121_HDMI_MODE_DVI))
goto unlock;
if ((ctx->id == ID_IT66121 || ctx->id == ID_IT66122) &&