public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: ite-it6263: Move chip initialization code from probe to atomic_enable
Date: Tue, 05 May 2026 09:39:38 +1000	[thread overview]
Message-ID: <review-overall-20260501061200.20129-1-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20260501061200.20129-1-biju.das.jz@bp.renesas.com>

Overall Series Review

Subject: drm/bridge: ite-it6263: Move chip initialization code from probe to atomic_enable
Author: Biju <biju.das.au@gmail.com>
Patches: 1
Reviewed: 2026-05-05T09:39:38.356348

---

This is a single-patch series that moves IT6263 bridge chip initialization (hardware reset, I2C address configuration, LVDS config, HDMI config) from `probe()` to `atomic_enable()`. The motivation is sound: on the RZ/G3L SMARC EVK, suspend-to-RAM powers down the IT6263, and the display controller's PM callbacks invoke `atomic_disable`/`atomic_enable`, so the chip must be fully reinitialized on each enable cycle.

The approach is reasonable and follows the pattern used by other bridge drivers that need to survive power loss. The patch is small and well-scoped. However, there are a few concerns worth raising:

**Concern 1 — Error handling regression in `atomic_enable`.** In `probe()`, the original `it6263_lvds_set_i2c_addr()` failure was fatal and returned an error via `dev_err_probe()`. In `atomic_enable()`, the failure is downgraded to a `dev_err()` log and execution continues. If the I2C address setup fails, subsequent writes to the LVDS regmap will go to the wrong address, likely causing silent corruption or a hang. The `atomic_enable` callback is void-returning so a direct return isn't possible, but the function should at least bail out early rather than proceeding with configuration that depends on the I2C address being set.

**Concern 2 — `it6263_detect()` / EDID reads before `atomic_enable`.** The `it6263_detect()` and `it6263_read_edid()` functions access the HDMI regmap to read HPD status and EDID. After this patch, the chip is no longer initialized in `probe()`, so these functions may be called against an uninitialized chip (e.g., during connector probing at boot). The `devm_regulator_bulk_get_enable` still powers the chip in probe, and the GPIO is requested as `GPIOD_OUT_LOW` (de-asserted reset on active-low), so the chip *may* come up in a usable-enough state for I2C register reads. But the HDMI config registers (e.g., `HDMI_REG_DDC_MASTER_CTRL`) are never written until `atomic_enable` now. This deserves a closer look at whether detect/EDID work reliably without `it6263_hdmi_config()` being called first.

**Concern 3 — No `atomic_disable` counterpart.** The `atomic_disable` only mutes audio/video and powers down the AFE driver. It does not assert the reset GPIO. This means on a normal disable/enable cycle (not involving a full power loss), the chip gets a gratuitous hardware reset pulse followed by full reinitialization. This should be harmless but adds ~46ms of latency to every enable.

---

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-05-04 23:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-01  6:11 [PATCH v4] drm/bridge: ite-it6263: Move chip initialization code from probe to atomic_enable Biju
2026-05-04 23:39 ` Claude review: " Claude Code Review Bot
2026-05-04 23:39 ` Claude Code Review Bot [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=review-overall-20260501061200.20129-1-biju.das.jz@bp.renesas.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