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: renesas: rz-du: Move mode_valid logic to per-output clock limits
Date: Sat, 16 May 2026 13:13:42 +1000	[thread overview]
Message-ID: <review-patch4-20260512144104.761531-5-prabhakar.mahadev-lad.rj@bp.renesas.com> (raw)
In-Reply-To: <20260512144104.761531-5-prabhakar.mahadev-lad.rj@bp.renesas.com>

Patch Review

**Status: Looks good, well designed.**

This is the key refactoring patch. It replaces the hard-coded clock check:

```c
-	if (renc->output == RZG2L_DU_OUTPUT_DPAD0 && mode->clock > 83500)
+	if (route->mode_clock_min && mode->clock < route->mode_clock_min)
+		return MODE_CLOCK_LOW;
+	if (route->mode_clock_max && mode->clock > route->mode_clock_max)
 		return MODE_CLOCK_HIGH;
```

The per-output routing struct gets new fields:

```c
+	int mode_clock_min;
+	int mode_clock_max;
```

The existing SoC infos are updated with the same limits that were previously hard-coded (20875/83500 for RZ/G2UL and RZ/G2L DPAD0). The zero-means-unbounded convention is clean and natural for C static initializers.

**One observation:** `mode_clock_min` and `mode_clock_max` are declared as `int` but are always used as unsigned values (kHz). Using `unsigned int` would be more semantically correct, though it's a minor style point. The existing fields in the struct (`possible_outputs`, `port`) use `unsigned int`.

The approach of encoding constraints per-output rather than per-SoC is a good design choice — the cover letter mentions this was moved from `device_info` to `output_routing` in v3, which is the right level of granularity since different outputs on the same SoC could have different clock limits.

Note that the `r9a09g057` (RZ/V2H) info has no clock limits set (all zeros), so no mode validation occurs for that SoC's DSI0 output. This is presumably intentional since the DSI bridge driver would handle its own clock constraints.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-05-16  3:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-12 14:40 [PATCH v3 0/5] Add DU support for RZ/T2H and RZ/N2H SoCs Prabhakar
2026-05-12 14:41 ` [PATCH v3 1/5] dt-bindings: display: renesas, rzg2l-du: Refuse port@1 for RZ/G2UL Prabhakar
2026-05-14 13:20   ` [PATCH v3 1/5] dt-bindings: display: renesas,rzg2l-du: " Rob Herring (Arm)
2026-05-16  3:13   ` Claude review: dt-bindings: display: renesas, rzg2l-du: " Claude Code Review Bot
2026-05-12 14:41 ` [PATCH v3 2/5] dt-bindings: display: renesas, rzg2l-du: Add RZ/T2H and RZ/N2H support Prabhakar
2026-05-14 15:23   ` [PATCH v3 2/5] dt-bindings: display: renesas,rzg2l-du: " Rob Herring (Arm)
2026-05-16  3:13   ` Claude review: dt-bindings: display: renesas, rzg2l-du: " Claude Code Review Bot
2026-05-12 14:41 ` [PATCH v3 3/5] drm: renesas: rz-du: Make DU reset control optional for RZ/T2H support Prabhakar
2026-05-16  3:13   ` Claude review: " Claude Code Review Bot
2026-05-12 14:41 ` [PATCH v3 4/5] drm: renesas: rz-du: Move mode_valid logic to per-output clock limits Prabhakar
2026-05-13 23:02   ` Laurent Pinchart
2026-05-14 12:56     ` Lad, Prabhakar
2026-05-16  3:13   ` Claude Code Review Bot [this message]
2026-05-12 14:41 ` [PATCH v3 5/5] drm: renesas: rz-du: Add support for RZ/T2H SoC Prabhakar
2026-05-16  3:13   ` Claude review: " Claude Code Review Bot
2026-05-16  3:13 ` Claude review: Add DU support for RZ/T2H and RZ/N2H SoCs 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-20260512144104.761531-5-prabhakar.mahadev-lad.rj@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