From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: ite-it66121: Move .mode_set logic to .atomic_enable
Date: Mon, 25 May 2026 17:50:13 +1000 [thread overview]
Message-ID: <review-patch2-20260523-it66121-fix-dvi-mode-v5-v5-2-33b4468162f9@redhat.com> (raw)
In-Reply-To: <20260523-it66121-fix-dvi-mode-v5-v5-2-33b4468162f9@redhat.com>
Patch Review
**Clean refactor.** The mode_set logic is correctly extracted into `it66121_set_mode()` and called from `atomic_enable`. The `ctx->connector` field is removed in favor of a local variable, which is the right approach.
**Mode lookup through atomic state is correct:**
```c
conn_state = drm_atomic_get_new_connector_state(state, connector);
crtc = conn_state->crtc;
crtc_state = drm_atomic_get_new_crtc_state(state, crtc);
mode = &crtc_state->adjusted_mode;
```
Each step correctly chains through the state to get the adjusted mode. The `WARN_ON` checks for NULL at each stage are defensive and appropriate.
**Enable ordering:**
```c
drm_atomic_helper_connector_hdmi_update_infoframes(connector, state);
it66121_set_mode(ctx, connector, state);
it66121_set_mute(ctx, false);
```
Infoframes are written before the TX mode is configured. This works because the infoframe data is just stored in hardware registers — actual transmission starts when the TX mode is enabled. However, the more natural order would be to configure the TX mode first, then enable infoframes. If there's a reason the IT66121 requires this order, a comment would help.
**The `connector = NULL` cleanup in `bridge_disable` is correctly removed**, since `connector` is now a local variable.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-25 7:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-23 10:40 [PATCH v5 0/3] drm/bridge: ite-it66121: Switch to HDMI helpers and fix DVI output Javier Martinez Canillas
2026-05-23 10:40 ` [PATCH v5 1/3] drm/bridge: ite-it66121: Switch to the HDMI connector helpers Javier Martinez Canillas
2026-05-25 7:50 ` Claude review: " Claude Code Review Bot
2026-05-23 10:40 ` [PATCH v5 2/3] drm/bridge: ite-it66121: Move .mode_set logic to .atomic_enable Javier Martinez Canillas
2026-05-25 7:50 ` Claude Code Review Bot [this message]
2026-05-23 10:41 ` [PATCH v5 3/3] drm/bridge: ite-it66121: Select HDMI or DVI mode based on sink type Javier Martinez Canillas
2026-05-25 7:50 ` Claude review: " Claude Code Review Bot
2026-05-25 7:50 ` Claude review: drm/bridge: ite-it66121: Switch to HDMI helpers and fix DVI output 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=review-patch2-20260523-it66121-fix-dvi-mode-v5-v5-2-33b4468162f9@redhat.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/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