From: Javier Martinez Canillas <javierm@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Javier Martinez Canillas <javierm@redhat.com>,
Andrzej Hajda <andrzej.hajda@intel.com>,
David Airlie <airlied@gmail.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Jonas Karlman <jonas@kwiboo.se>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Luca Ceresoli <luca.ceresoli@bootlin.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Phong LE <ple@baylibre.com>, Robert Foss <rfoss@kernel.org>,
Simona Vetter <simona@ffwll.ch>,
Thomas Zimmermann <tzimmermann@suse.de>,
dri-devel@lists.freedesktop.org
Subject: [PATCH v3 2/2] drm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type
Date: Tue, 12 May 2026 15:22:16 +0200 [thread overview]
Message-ID: <20260512132232.333654-3-javierm@redhat.com> (raw)
In-Reply-To: <20260512132232.333654-1-javierm@redhat.com>
The driver assumes that the sink type is always HDMI and unconditionally
configures the bridge in this mode and enables the transmission of AVI
infoframe packets.
But this cause issues with DVI monitors, that can fail to interpret the
video signal and lead to not having any display output.
Check the connector display information sink type to decide whether DVI or
HDMI mode should be set and if the AVI infoframes packets should be sent.
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
---
Changes in v3:
- Move the HDMI/DVI mode set to the .atomic_enable handler (Maxime Ripard).
Changes in v2:
- Don't store the sink type in a per-commit bridge state (Maxime Ripard).
drivers/gpu/drm/bridge/ite-it66121.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
index 648ca50712df..94fd513481b5 100644
--- a/drivers/gpu/drm/bridge/ite-it66121.c
+++ b/drivers/gpu/drm/bridge/ite-it66121.c
@@ -182,6 +182,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)
@@ -671,15 +672,23 @@ static int it66121_set_mute(struct it66121_ctx *ctx, bool mute)
static void it66121_set_tx_mode(struct it66121_ctx *ctx)
{
+ unsigned int avi_pkt = 0;
+ unsigned int mode = IT66121_HDMI_MODE_DVI;
+ struct drm_connector *connector = ctx->connector;
+
+ if (connector->display_info.is_hdmi) {
+ mode = IT66121_HDMI_MODE_HDMI;
+ avi_pkt = IT66121_AVI_INFO_PKT_ON | IT66121_AVI_INFO_PKT_RPT;
+ }
+
mutex_lock(&ctx->lock);
- /* Enable AVI infoframe */
- if (regmap_write(ctx->regmap, IT66121_AVI_INFO_PKT_REG,
- IT66121_AVI_INFO_PKT_ON | IT66121_AVI_INFO_PKT_RPT))
+ /* Enable or disable AVI infoframe */
+ if (regmap_write(ctx->regmap, IT66121_AVI_INFO_PKT_REG, avi_pkt))
goto unlock;
- /* Set TX mode to HDMI */
- regmap_write(ctx->regmap, IT66121_HDMI_MODE_REG, IT66121_HDMI_MODE_HDMI);
+ /* Set TX mode to DVI or HDMI */
+ regmap_write(ctx->regmap, IT66121_HDMI_MODE_REG, mode);
unlock:
mutex_unlock(&ctx->lock);
--
2.54.0
prev parent reply other threads:[~2026-05-12 13:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-12 13:22 [PATCH v3 0/2] drm/bridge: it66121: Fix display output on DVI monitors Javier Martinez Canillas
2026-05-12 13:22 ` [PATCH v3 1/2] drm/bridge: ite-it66121: Set TX mode in the .atomic_enable callback Javier Martinez Canillas
2026-05-12 14:07 ` Maxime Ripard
2026-05-12 18:54 ` Javier Martinez Canillas
2026-05-12 13:22 ` Javier Martinez Canillas [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260512132232.333654-3-javierm@redhat.com \
--to=javierm@redhat.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=luca.ceresoli@bootlin.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=ple@baylibre.com \
--cc=rfoss@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox