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/rockchip: analogix_dp: Add support for RK3576
Date: Wed, 11 Mar 2026 13:27:11 +1000	[thread overview]
Message-ID: <review-patch4-20260310105307.309765-5-damon.ding@rock-chips.com> (raw)
In-Reply-To: <20260310105307.309765-5-damon.ding@rock-chips.com>

Patch Review

**hclk lifetime concern.** The `hclk` is acquired with `devm_clk_get_optional_enabled()`:

```c
+	dp->hclk = devm_clk_get_optional_enabled(dev, "hclk");
```

This means the clock is enabled at probe time and stays enabled for the entire lifetime of the device (until driver removal). The commit message says "which must be enabled during probing for RK3576 eDP controller," but keeping it permanently enabled may waste power. Consider whether it should instead be enabled/disabled alongside `pclk` in `rockchip_dp_poweron()`/`rockchip_dp_powerdown()`. If it truly needs to be always-on, a comment explaining why would be helpful.

That said, `devm_clk_get_optional_enabled` is a valid pattern used elsewhere in the kernel, and if the clock must be on whenever the device is bound (e.g., for register access), this is correct.

**Missing `edp_mode` GRF field.** The RK3576 chip_data has no `edp_mode` field set:

```c
+static const struct rockchip_dp_chip_data rk3576_edp[] = {
+	{
+		.chip_type = RK3576_EDP,
+		.reg = 0x27dc0000,
+	},
+	{ /* sentinel */ }
+};
```

Compare with RK3588 which has:
```c
	.edp_mode = GRF_REG_FIELD(0x0000, 0, 0),
```

The `edp_mode` field is used in `rockchip_dp_poweron()` and `rockchip_dp_powerdown()` via `rockchip_grf_field_write()`. Since the field's `.valid` will be `false` (zero-initialized), `rockchip_grf_field_write()` will return 0 early — so this is functionally safe. But the commit message should clarify whether RK3576 genuinely has no GRF edp_mode bit, or if this is an oversight.

**No `lcdc_sel` either** — this is used in `rockchip_dp_drm_encoder_enable()`. Again, `rockchip_grf_field_write()` will silently no-op due to `.valid = false`. This is consistent with RK3588 which also has no `lcdc_sel`, so this appears intentional.

No blocking issues, but the hclk lifecycle and missing `edp_mode` documentation could use clarification.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-03-11  3:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-10 10:53 [PATCH v1 0/4] Add eDP support for RK3576 Damon Ding
2026-03-10 10:53 ` [PATCH v1 1/4] dt-bindings: display: rockchip: analogix-dp: Add " Damon Ding
2026-03-11  3:27   ` Claude review: " Claude Code Review Bot
2026-03-10 10:53 ` [PATCH v1 2/4] arm64: dts: rockchip: Add eDP node " Damon Ding
2026-03-11  3:27   ` Claude review: " Claude Code Review Bot
2026-03-10 10:53 ` [PATCH v1 3/4] drm/bridge: analogix_dp: Add support " Damon Ding
2026-03-11  3:27   ` Claude review: " Claude Code Review Bot
2026-03-10 10:53 ` [PATCH v1 4/4] drm/rockchip: " Damon Ding
2026-03-11  3:27   ` Claude Code Review Bot [this message]
2026-03-10 11:11 ` [PATCH v1 0/4] Add eDP " Damon Ding
2026-03-11  3:27 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-03-19 10:40 [PATCH v2 0/9] " Damon Ding
2026-03-20  0:45 ` [PATCH v2 9/9] drm/rockchip: analogix_dp: Add " Damon Ding
2026-03-21 18:26   ` Claude review: " 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-patch4-20260310105307.309765-5-damon.ding@rock-chips.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