]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type
authorJavier Martinez Canillas <javierm@redhat.com>
Sat, 23 May 2026 10:41:00 +0000 (12:41 +0200)
committerJavier Martinez Canillas <javierm@redhat.com>
Tue, 26 May 2026 10:27:57 +0000 (12:27 +0200)
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>
drivers/gpu/drm/bridge/ite-it66121.c

index 9725e5db5db3abbb2f1178e22b120470139ae780..a469e8d9d2d876e0861a0fbad447fd9b6220e509 100644 (file)
 
 #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) &&