From: Maxime Ripard <mripard@kernel.org>
To: Javier Martinez Canillas <javierm@redhat.com>
Cc: linux-kernel@vger.kernel.org,
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>,
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: Re: [PATCH v4 3/3] drm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type
Date: Fri, 15 May 2026 11:28:21 +0200 [thread overview]
Message-ID: <20260515-divergent-placid-avocet-ed0ffb@houat> (raw)
In-Reply-To: <20260515090220.809830-4-javierm@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 2264 bytes --]
On Fri, May 15, 2026 at 11:02:11AM +0200, Javier Martinez Canillas wrote:
> The driver unconditionally sets the transmission mode to HDMI, which leads
> to display output not working with DVI monitors. Check connector's display
> information sink type to identify the correct mode to configure the bridge.
>
> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
> ---
>
> Changes in v4:
> - Convert the driver to use the HDMI helpers (Maxime Ripard).
> - Move .mode_set logic to .atomic_enable (Maxime Ripard).
>
> 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 | 9 +++++++--
> 1 file changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/ite-it66121.c b/drivers/gpu/drm/bridge/ite-it66121.c
> index c8795247cfa8..95ee98a4a8df 100644
> --- a/drivers/gpu/drm/bridge/ite-it66121.c
> +++ b/drivers/gpu/drm/bridge/ite-it66121.c
> @@ -184,6 +184,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)
> @@ -658,6 +659,7 @@ static void it66121_set_mode(struct it66121_ctx *ctx,
> struct drm_atomic_commit *state)
> {
> struct drm_connector *connector = ctx->connector;
> + unsigned int tx_mode = IT66121_HDMI_MODE_HDMI;
> const struct drm_crtc_state *crtc_state;
> const struct drm_display_mode *mode;
> struct drm_crtc *crtc;
> @@ -666,10 +668,13 @@ static void it66121_set_mode(struct it66121_ctx *ctx,
> crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
> mode = &crtc_state->adjusted_mode;
>
> + if (!connector->display_info.is_hdmi)
> + tx_mode = IT66121_HDMI_MODE_DVI;
> +
> 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, tx_mode))
A ternary operator would probably be better here?
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
next prev parent reply other threads:[~2026-05-15 9:28 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 9:02 [PATCH v4 0/3] drm/bridge: ite-it66121: Fix display output for DVI monitors Javier Martinez Canillas
2026-05-15 9:02 ` [PATCH v4 1/3] drm/bridge: ite-it66121: Switch to the HDMI connector helpers Javier Martinez Canillas
2026-05-15 9:23 ` Maxime Ripard
2026-05-15 9:35 ` Javier Martinez Canillas
2026-05-15 9:40 ` Maxime Ripard
2026-05-15 23:32 ` Claude review: " Claude Code Review Bot
2026-05-15 9:02 ` [PATCH v4 2/3] drm/bridge: ite-it66121: Move logic .mode_set setup to .atomic_enable Javier Martinez Canillas
2026-05-15 9:27 ` Maxime Ripard
2026-05-15 23:32 ` Claude review: " Claude Code Review Bot
2026-05-15 9:02 ` [PATCH v4 3/3] drm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type Javier Martinez Canillas
2026-05-15 9:28 ` Maxime Ripard [this message]
2026-05-15 23:32 ` Claude review: " Claude Code Review Bot
2026-05-15 23:32 ` Claude review: drm/bridge: ite-it66121: Fix display output for DVI monitors Claude Code Review Bot
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=20260515-divergent-placid-avocet-ed0ffb@houat \
--to=mripard@kernel.org \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=airlied@gmail.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--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=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