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-patch1-20260501061200.20129-1-biju.das.jz@bp.renesas.com> (raw)
In-Reply-To: <20260501061200.20129-1-biju.das.jz@bp.renesas.com>

Patch Review

**Adding `reset_gpio` to struct (line 203 of patched file):**
```c
struct gpio_desc *reset_gpio;
```
Straightforward. Needed to make the GPIO accessible beyond probe scope.

**Initialization block in `atomic_enable` (lines 607–614):**
```c
it6263_hw_reset(it->reset_gpio);

ret = it6263_lvds_set_i2c_addr(it);
if (ret)
    dev_err(it->dev, "failed to set I2C addr\n");

it6263_lvds_config(it);
it6263_hdmi_config(it);
```

- The `it6263_hw_reset()` call is fine here — it already handles a NULL `reset_gpio` gracefully.

- **Issue: Continuing after `it6263_lvds_set_i2c_addr` failure.** If this call fails, `it6263_lvds_config()` will write to the LVDS regmap, which uses the I2C address that was supposed to be configured by `it6263_lvds_set_i2c_addr()`. Looking at the code, the LVDS I2C device is created with `LVDS_INPUT_CTRL_I2C_ADDR` as a fixed address via `devm_i2c_new_dummy_device()` in probe, and `it6263_lvds_set_i2c_addr()` tells the *HDMI chip* to expose the LVDS sub-block at that address. So if this fails, subsequent LVDS regmap operations will be talking to an address where nothing is responding, and you'll get I2C errors. The function should `return` early here instead of continuing:

  ```c
  ret = it6263_lvds_set_i2c_addr(it);
  if (ret) {
      dev_err(it->dev, "failed to set I2C addr\n");
      return;
  }
  ```

**Removal from probe (lines 879–882 area of patched file):**
```c
-	it6263_hw_reset(reset_gpio);
-
-	ret = it6263_lvds_set_i2c_addr(it);
-	if (ret)
-		return dev_err_probe(dev, ret, "failed to set I2C addr\n");
```

The removal is clean. However, note that `it6263_parse_dt()` (called at line 880) does not access the chip hardware, and `devm_i2c_new_dummy_device()` at line 884 reserves the I2C address but doesn't communicate with the chip, so this ordering is fine.

```c
-	it6263_lvds_config(it);
-	it6263_hdmi_config(it);
```

Also cleanly removed.

**Summary:** The patch is fundamentally correct in its approach. The main actionable feedback is:

1. **Return early on `it6263_lvds_set_i2c_addr` failure in `atomic_enable`** rather than proceeding with LVDS/HDMI config that will fail.

2. **Verify that `it6263_detect()` works without `it6263_hdmi_config()`** having been called. The DDC master select (`MASTER_SEL_HOST`) is only written in `it6263_read_edid`, not in `it6263_hdmi_config`, so EDID reads may be fine. But `it6263_detect()` reads `HDMI_REG_SYS_STATUS` for HPD — confirm this register is readable in the chip's power-on-reset state without the soft-reset sequence from `it6263_hdmi_config()`.

---
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-patch1-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