From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm/bridge: ite-it66121: Set TX mode in the .atomic_enable callback Date: Sat, 16 May 2026 13:19:45 +1000 Message-ID: In-Reply-To: <20260512132232.333654-2-javierm@redhat.com> References: <20260512132232.333654-1-javierm@redhat.com> <20260512132232.333654-2-javierm@redhat.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Issue: Duplicate register writes not removed from `.mode_set`** The patch adds a new `it66121_set_tx_mode()` called from `it66121_bridge_en= able()`, but the existing code in `it66121_bridge_mode_set()` still writes = the same registers: ```c /* Enable AVI infoframe */ if (regmap_write(ctx->regmap, IT66121_AVI_INFO_PKT_REG, IT66121_AVI_INFO_PKT_ON | IT66121_AVI_INFO_PKT_RPT)) goto unlock; /* Set TX mode to HDMI */ if (regmap_write(ctx->regmap, IT66121_HDMI_MODE_REG, IT66121_HDMI_MODE_HDMI= )) goto unlock; ``` These lines at the current tree's lines 796-803 are not removed. The diffst= at shows `1 file changed, 18 insertions(+)` with zero deletions, confirming= the old code remains. The commit message says "it is more correct to do th= is in .atomic_enable" but doesn't explain why the old writes are kept. Thes= e should be removed from `.mode_set` to avoid writing the same registers tw= ice per mode change, and to avoid confusion about which callback is the aut= horitative one. **Minor: Error handling style** ```c if (regmap_write(ctx->regmap, IT66121_AVI_INFO_PKT_REG, IT66121_AVI_INFO_PKT_ON | IT66121_AVI_INFO_PKT_RPT)) goto unlock; regmap_write(ctx->regmap, IT66121_HDMI_MODE_REG, IT66121_HDMI_MODE_HDMI); ``` The first `regmap_write` checks for errors and jumps to `unlock`, but the s= econd `regmap_write` result is silently discarded. This is inconsistent =E2= =80=94 either both should check for errors or neither should (the existing = `.mode_set` code checks both). This is a minor nit since the function retur= ns void and there's nothing to do on error except release the lock, but con= sistency is preferred. **Ordering observation**: The call to `it66121_set_tx_mode()` is placed *af= ter* `it66121_set_mute(ctx, false)` in `.atomic_enable`. This means the dis= play is unmuted before the TX mode is configured. On a DVI monitor receivin= g HDMI-mode infoframes during this window, there could be a brief glitch. C= onsider placing `it66121_set_tx_mode()` before the unmute. This ordering al= so matters because in the existing `.mode_set`, the TX mode/infoframe setup= is done *before* the AFE configuration and *before* unmute =E2=80=94 movin= g it after unmute changes the sequencing. --- Generated by Claude Code Patch Reviewer