From: Javier Martinez Canillas Date: Sat, 23 May 2026 10:41:00 +0000 (+0200) Subject: drm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=fde6fa5a58f30078a06d5a3bc07bb558f48e142b;p=thirdparty%2Flinux.git 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 Link: https://patch.msgid.link/20260523-it66121-fix-dvi-mode-v5-v5-3-33b4468162f9@redhat.com Signed-off-by: Javier Martinez Canillas --- diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c index 9725e5db5db3..a469e8d9d2d8 100644 --- a/drivers/gpu/drm/bridge/ite-it66121.c +++ b/drivers/gpu/drm/bridge/ite-it66121.c @@ -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) &&