public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH v3 0/5] Add DU support for RZ/T2H and RZ/N2H SoCs
@ 2026-05-12 14:40 Prabhakar
  2026-05-12 14:41 ` [PATCH v3 1/5] dt-bindings: display: renesas, rzg2l-du: Refuse port@1 for RZ/G2UL Prabhakar
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Prabhakar @ 2026-05-12 14:40 UTC (permalink / raw)
  To: Biju Das, Laurent Pinchart, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Philipp Zabel,
	Geert Uytterhoeven, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, linux-kernel, Prabhakar,
	Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi All,

This series adds support for the Display Unit (DU) on the RZ/T2H
and RZ/N2H (R9A09G087) SoCs. The DU on these platforms is
functionally similar to the RZ/G2UL DU but includes some SoC
specific differences such as a single output port and explicit
DPI output enable control. The series includes the following
changes:
1. Add device tree bindings for the RZ/T2H and RZ/N2H DU variants,
   including a new compatible string.
2. Make the DU reset control optional to allow probing on RZ/T2H
   where the DU does not have a reset line.
3. Move pixel clock validation logic to per-SoC constraints in
   rzg2l_du_device_info to accommodate different clock limits
   across SoCs.
4. Implement support for the RZ/T2H DU variant in the driver,
   including handling of the DPI output enable signal.

Patches are rebased on next-20260508 and apply on drm-next.

v2->v3:
- Rebased on latest next-20260508.
- Included Tommaso's patch to refuse port@1 for RZ/G2UL, which was
  previously in a separate series.
- Moved clock limits from device_info to output_routing to allow
  per-output constraints.
- Updated commit message for patch#4

v1->v2:
- Dropped the "port" property in favor of "ports" with a single port@0
  child, to align with the existing RZ/G2L bindings and simplify the
  device tree structure.
- Updated the commit message to reflect the change from "port" to "ports".
- Dropped storing info pointer in struct rzg2l_du_encoder as it's not
  needed.
- Add Reviewed-by tags from Laurent for patches 2-4.
- Rebase on latest next-20260507.

Cheers,
Prabhakar

Lad Prabhakar (4):
  dt-bindings: display: renesas,rzg2l-du: Add RZ/T2H and RZ/N2H support
  drm: renesas: rz-du: Make DU reset control optional for RZ/T2H support
  drm: renesas: rz-du: Move mode_valid logic to per-output clock limits
  drm: renesas: rz-du: Add support for RZ/T2H SoC

Tommaso Merciai (1):
  dt-bindings: display: renesas,rzg2l-du: Refuse port@1 for RZ/G2UL

 .../bindings/display/renesas,rzg2l-du.yaml    | 21 +++++++++++++++++--
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c |  9 ++++++--
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c  | 18 ++++++++++++++++
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h  | 14 +++++++++++++
 .../gpu/drm/renesas/rz-du/rzg2l_du_encoder.c  |  6 +++++-
 5 files changed, 63 insertions(+), 5 deletions(-)

-- 
2.54.0


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [PATCH v3 1/5] dt-bindings: display: renesas, rzg2l-du: Refuse port@1 for RZ/G2UL
  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 ` 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
                   ` (4 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Prabhakar @ 2026-05-12 14:41 UTC (permalink / raw)
  To: Biju Das, Laurent Pinchart, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Philipp Zabel,
	Geert Uytterhoeven, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, linux-kernel, Prabhakar,
	Fabrizio Castro, Tommaso Merciai, Lad Prabhakar

From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>

The RZ/G2UL DU supports only a single port@0 DPI. Explicitly refuse
port@1 in the ports node.

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v3:
- Was orignally part of separate series [0]
[0] https://lore.kernel.org/all/d1e0d4e0fe74e60345a3d043fb4f9128c1057638.1778141145.git.tommaso.merciai.xr@bp.renesas.com/
---
 Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml b/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
index 2cc66dcef870..5add3b832eab 100644
--- a/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
+++ b/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
@@ -102,6 +102,7 @@ allOf:
           properties:
             port@0:
               description: DPI
+            port@1: false
 
           required:
             - port@0
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 2/5] dt-bindings: display: renesas, rzg2l-du: Add RZ/T2H and RZ/N2H support
  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-12 14:41 ` 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
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 16+ messages in thread
From: Prabhakar @ 2026-05-12 14:41 UTC (permalink / raw)
  To: Biju Das, Laurent Pinchart, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Philipp Zabel,
	Geert Uytterhoeven, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, linux-kernel, Prabhakar,
	Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Document the Display Unit (DU) support for the RZ/T2H and RZ/N2H SoCs.

The DU block on RZ/T2H is functionally equivalent to the RZ/G2UL DU and
supports the DPI interface, but includes SoC-specific register differences
and has no reset control. Add a dedicated compatible string to represent
this variant and update the allOf constraints accordingly.

As the DU implementation on RZ/N2H matches RZ/T2H, describe it using an
RZ/N2H specific compatible string with the RZ/T2H compatible as fallback.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v2->v3:
- No change

v1->v2:
- Dropped the "port" property in favor of "ports" with a single port@0
  child, to align with the existing RZ/G2L bindings and simplify the
  device tree structure.
- Updated the commit message to reflect the change from "port" to "ports".
- Dropped RB tag from Rob due to above changes.
---
 .../bindings/display/renesas,rzg2l-du.yaml    | 20 +++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml b/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
index 5add3b832eab..7c84a9ecc7a7 100644
--- a/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
+++ b/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
@@ -21,6 +21,7 @@ properties:
           - renesas,r9a07g043u-du # RZ/G2UL
           - renesas,r9a07g044-du # RZ/G2{L,LC}
           - renesas,r9a09g057-du # RZ/V2H(P)
+          - renesas,r9a09g077-du # RZ/T2H
       - items:
           - enum:
               - renesas,r9a07g054-du    # RZ/V2L
@@ -28,6 +29,9 @@ properties:
       - items:
           - const: renesas,r9a09g056-du # RZ/V2N
           - const: renesas,r9a09g057-du # RZ/V2H(P) fallback
+      - items:
+          - const: renesas,r9a09g087-du # RZ/N2H
+          - const: renesas,r9a09g077-du # RZ/T2H fallback
 
   reg:
     maxItems: 1
@@ -83,7 +87,6 @@ required:
   - interrupts
   - clocks
   - clock-names
-  - resets
   - power-domains
   - ports
   - renesas,vsps
@@ -95,7 +98,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: renesas,r9a07g043u-du
+            enum:
+              - renesas,r9a07g043u-du
+              - renesas,r9a09g077-du
     then:
       properties:
         ports:
@@ -138,6 +143,17 @@ allOf:
 
           required:
             - port@0
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: renesas,r9a09g077-du
+    then:
+      properties:
+        resets: false
+    else:
+      required:
+        - resets
 
 examples:
   # RZ/G2L DU
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 3/5] drm: renesas: rz-du: Make DU reset control optional for RZ/T2H support
  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-12 14:41 ` [PATCH v3 2/5] dt-bindings: display: renesas, rzg2l-du: Add RZ/T2H and RZ/N2H support Prabhakar
@ 2026-05-12 14:41 ` 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
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 16+ messages in thread
From: Prabhakar @ 2026-05-12 14:41 UTC (permalink / raw)
  To: Biju Das, Laurent Pinchart, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Philipp Zabel,
	Geert Uytterhoeven, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, linux-kernel, Prabhakar,
	Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Update the DU CRTC initialisation to request the reset control using
devm_reset_control_get_optional_shared(). On RZ/T2H SoCs the DU block does
not expose a reset line, and treating the reset as mandatory prevents the
driver from probing on those platforms.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
v2->v3:
- No change

v1->v2:
- Added Reviewed-by tag from Laurent Pinchart.
---
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
index 26b95153ce88..48065f4952a3 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
@@ -380,7 +380,7 @@ int rzg2l_du_crtc_create(struct rzg2l_du_device *rcdu)
 	struct drm_plane *primary;
 	int ret;
 
-	rcrtc->rstc = devm_reset_control_get_shared(rcdu->dev, NULL);
+	rcrtc->rstc = devm_reset_control_get_optional_shared(rcdu->dev, NULL);
 	if (IS_ERR(rcrtc->rstc)) {
 		dev_err(rcdu->dev, "can't get cpg reset\n");
 		return PTR_ERR(rcrtc->rstc);
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 4/5] drm: renesas: rz-du: Move mode_valid logic to per-output clock limits
  2026-05-12 14:40 [PATCH v3 0/5] Add DU support for RZ/T2H and RZ/N2H SoCs Prabhakar
                   ` (2 preceding siblings ...)
  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-12 14:41 ` Prabhakar
  2026-05-13 23:02   ` Laurent Pinchart
  2026-05-16  3:13   ` Claude review: " Claude Code Review Bot
  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: Add DU support for RZ/T2H and RZ/N2H SoCs Claude Code Review Bot
  5 siblings, 2 replies; 16+ messages in thread
From: Prabhakar @ 2026-05-12 14:41 UTC (permalink / raw)
  To: Biju Das, Laurent Pinchart, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Philipp Zabel,
	Geert Uytterhoeven, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, linux-kernel, Prabhakar,
	Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Move pixel clock validation from a fixed encoder check to per-output
constraints stored in rzg2l_du_output_routing.

Previously, rzg2l_du_encoder_mode_valid() applied a hard-coded 83.5 MHz
upper limit specifically for DPAD0. This approach cannot scale across the
RZ DU family because pixel clock limits vary per SoC and per output
interface.

Add mode_clock_min and mode_clock_max fields to rzg2l_du_output_routing
so that clock constraints are expressed at the granularity of individual
output interfaces rather than globally per SoC. Update
rzg2l_du_encoder_mode_valid() to look up the routing entry for the active
output and return MODE_CLOCK_LOW or MODE_CLOCK_HIGH when the pixel clock
falls outside the declared range. A value of 0 for either field means no
bound is enforced in that direction.

Set the DPAD0 pixel clock limits for RZ/G2UL (R9A07G043U) to 20.875 MHz
minimum and 83.5 MHz maximum. RZ/G2L and RZ/G2LC (R9A07G044) share the
same DPAD0 pixel clock limits.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
v2->v3:
- Moved clock limits from device_info to output_routing to allow
  per-output constraints.
- Updated commit message to reflect the change in approach.

v1->v2:
- Dropped storing info pointer in struct rzg2l_du_encoder as it's not needed.
---
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c     | 4 ++++
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h     | 4 ++++
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c | 6 +++++-
 3 files changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
index 0fef33a5a089..d1bc205eb5f8 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
@@ -33,6 +33,8 @@ static const struct rzg2l_du_device_info rzg2l_du_r9a07g043u_info = {
 		[RZG2L_DU_OUTPUT_DPAD0] = {
 			.possible_outputs = BIT(0),
 			.port = 0,
+			.mode_clock_min = 20875,
+			.mode_clock_max = 83500,
 		},
 	},
 };
@@ -47,6 +49,8 @@ static const struct rzg2l_du_device_info rzg2l_du_r9a07g044_info = {
 		[RZG2L_DU_OUTPUT_DPAD0] = {
 			.possible_outputs = BIT(0),
 			.port = 1,
+			.mode_clock_min = 20875,
+			.mode_clock_max = 83500,
 		}
 	}
 };
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
index 58806c2a8f2b..307ae70dd382 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
@@ -30,6 +30,8 @@ enum rzg2l_du_output {
  * struct rzg2l_du_output_routing - Output routing specification
  * @possible_outputs: bitmask of possible outputs
  * @port: device tree port number corresponding to this output route
+ * @mode_clock_min: minimum pixel clock in kHz
+ * @mode_clock_max: maximum pixel clock in kHz
  *
  * The DU has 2 possible outputs (DPAD0, DSI0). Output routing data
  * specify the valid SoC outputs, which CRTC can drive the output, and the type
@@ -38,6 +40,8 @@ enum rzg2l_du_output {
 struct rzg2l_du_output_routing {
 	unsigned int possible_outputs;
 	unsigned int port;
+	int mode_clock_min;
+	int mode_clock_max;
 };
 
 /*
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
index 0e567b57a408..4af2ae09ff39 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
@@ -50,8 +50,12 @@ rzg2l_du_encoder_mode_valid(struct drm_encoder *encoder,
 			    const struct drm_display_mode *mode)
 {
 	struct rzg2l_du_encoder *renc = to_rzg2l_encoder(encoder);
+	struct rzg2l_du_device *rcdu = to_rzg2l_du_device(renc->base.dev);
+	const struct rzg2l_du_output_routing *route = &rcdu->info->routes[renc->output];
 
-	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;
 
 	return MODE_OK;
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [PATCH v3 5/5] drm: renesas: rz-du: Add support for RZ/T2H SoC
  2026-05-12 14:40 [PATCH v3 0/5] Add DU support for RZ/T2H and RZ/N2H SoCs Prabhakar
                   ` (3 preceding siblings ...)
  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-12 14:41 ` 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
  5 siblings, 1 reply; 16+ messages in thread
From: Prabhakar @ 2026-05-12 14:41 UTC (permalink / raw)
  To: Biju Das, Laurent Pinchart, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Philipp Zabel,
	Geert Uytterhoeven, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, linux-kernel, Prabhakar,
	Fabrizio Castro, Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

The RZ/T2H (R9A09G077) SoC includes a DU with a DPI interface,
supporting resolutions up to WXGA with two RPFs for layer blending.
Unlike earlier RZ/G2L SoCs, RZ/T2H requires explicit assertion of a
DPI output-enable signal (DU_MCR0_DPI_EN) during CRTC startup.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
v2->v3:
- Moved clock limits from device_info to output_routing to allow
  per-output constraints.

v1->v2:
- Added Reviewed-by tag from Laurent Pinchart.
---
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c |  7 ++++++-
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c  | 14 ++++++++++++++
 drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h  | 10 ++++++++++
 3 files changed, 30 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
index 48065f4952a3..d0f01aa642a7 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_crtc.c
@@ -28,6 +28,7 @@
 #include "rzg2l_du_vsp.h"
 
 #define DU_MCR0			0x00
+#define DU_MCR0_DPI_EN		BIT(0)
 #define DU_MCR0_DI_EN		BIT(8)
 
 #define DU_DITR0		0x10
@@ -217,8 +218,12 @@ static void rzg2l_du_crtc_put(struct rzg2l_du_crtc *rcrtc)
 static void rzg2l_du_start_stop(struct rzg2l_du_crtc *rcrtc, bool start)
 {
 	struct rzg2l_du_device *rcdu = rcrtc->dev;
+	u32 val = DU_MCR0_DI_EN;
 
-	writel(start ? DU_MCR0_DI_EN : 0, rcdu->mmio + DU_MCR0);
+	if (start && rzg2l_du_has(rcdu, RZG2L_DU_FEATURE_DPIO_OE))
+		val |= DU_MCR0_DPI_EN;
+
+	writel(start ? val : 0, rcdu->mmio + DU_MCR0);
 }
 
 static void rzg2l_du_crtc_start(struct rzg2l_du_crtc *rcrtc)
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
index d1bc205eb5f8..0d4021429577 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
@@ -65,10 +65,24 @@ static const struct rzg2l_du_device_info rzg2l_du_r9a09g057_info = {
 	},
 };
 
+static const struct rzg2l_du_device_info rzg2l_du_r9a09g077_info = {
+	.channels_mask = BIT(0),
+	.routes = {
+		[RZG2L_DU_OUTPUT_DPAD0] = {
+			.possible_outputs = BIT(0),
+			.port = 0,
+			.mode_clock_min = 5000,
+			.mode_clock_max = 100000,
+		},
+	},
+	.features = RZG2L_DU_FEATURE_DPIO_OE,
+};
+
 static const struct of_device_id rzg2l_du_of_table[] = {
 	{ .compatible = "renesas,r9a07g043u-du", .data = &rzg2l_du_r9a07g043u_info },
 	{ .compatible = "renesas,r9a07g044-du", .data = &rzg2l_du_r9a07g044_info },
 	{ .compatible = "renesas,r9a09g057-du", .data = &rzg2l_du_r9a09g057_info },
+	{ .compatible = "renesas,r9a09g077-du", .data = &rzg2l_du_r9a09g077_info },
 	{ /* sentinel */ }
 };
 
diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
index 307ae70dd382..2cb2d1895979 100644
--- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
+++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
@@ -20,6 +20,8 @@
 struct device;
 struct drm_property;
 
+#define RZG2L_DU_FEATURE_DPIO_OE	BIT(0)	/* Has DPIO output enable control */
+
 enum rzg2l_du_output {
 	RZG2L_DU_OUTPUT_DSI0,
 	RZG2L_DU_OUTPUT_DPAD0,
@@ -48,10 +50,12 @@ struct rzg2l_du_output_routing {
  * struct rzg2l_du_device_info - DU model-specific information
  * @channels_mask: bit mask of available DU channels
  * @routes: array of CRTC to output routes, indexed by output (RZG2L_DU_OUTPUT_*)
+ * @features: device features (RZG2L_DU_FEATURE_*)
  */
 struct rzg2l_du_device_info {
 	unsigned int channels_mask;
 	struct rzg2l_du_output_routing routes[RZG2L_DU_OUTPUT_MAX];
+	unsigned int features;
 };
 
 #define RZG2L_DU_MAX_CRTCS		1
@@ -77,6 +81,12 @@ static inline struct rzg2l_du_device *to_rzg2l_du_device(struct drm_device *dev)
 	return container_of(dev, struct rzg2l_du_device, ddev);
 }
 
+static inline bool rzg2l_du_has(struct rzg2l_du_device *rcdu,
+				unsigned int feature)
+{
+	return rcdu->info->features & feature;
+}
+
 const char *rzg2l_du_output_name(enum rzg2l_du_output output);
 
 #endif /* __RZG2L_DU_DRV_H__ */
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 4/5] drm: renesas: rz-du: Move mode_valid logic to per-output clock limits
  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 review: " Claude Code Review Bot
  1 sibling, 1 reply; 16+ messages in thread
From: Laurent Pinchart @ 2026-05-13 23:02 UTC (permalink / raw)
  To: Prabhakar
  Cc: Biju Das, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Philipp Zabel, Geert Uytterhoeven, Magnus Damm,
	dri-devel, linux-renesas-soc, devicetree, linux-kernel,
	Fabrizio Castro, Lad Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Tue, May 12, 2026 at 03:41:03PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Move pixel clock validation from a fixed encoder check to per-output
> constraints stored in rzg2l_du_output_routing.
> 
> Previously, rzg2l_du_encoder_mode_valid() applied a hard-coded 83.5 MHz
> upper limit specifically for DPAD0. This approach cannot scale across the
> RZ DU family because pixel clock limits vary per SoC and per output
> interface.
> 
> Add mode_clock_min and mode_clock_max fields to rzg2l_du_output_routing
> so that clock constraints are expressed at the granularity of individual
> output interfaces rather than globally per SoC. Update
> rzg2l_du_encoder_mode_valid() to look up the routing entry for the active
> output and return MODE_CLOCK_LOW or MODE_CLOCK_HIGH when the pixel clock
> falls outside the declared range. A value of 0 for either field means no
> bound is enforced in that direction.
> 
> Set the DPAD0 pixel clock limits for RZ/G2UL (R9A07G043U) to 20.875 MHz
> minimum and 83.5 MHz maximum. RZ/G2L and RZ/G2LC (R9A07G044) share the
> same DPAD0 pixel clock limits.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v2->v3:
> - Moved clock limits from device_info to output_routing to allow
>   per-output constraints.

Given that the DU has a single output, connected to multiple encoders,
is the clock frequency limitation really a *per-output* property of the
DU ? Clock constraints coming from encoders can be expressed in the
respective bridge drivers (and the DSI encoder driver does so already).

> - Updated commit message to reflect the change in approach.
> 
> v1->v2:
> - Dropped storing info pointer in struct rzg2l_du_encoder as it's not needed.
> ---
>  drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c     | 4 ++++
>  drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h     | 4 ++++
>  drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c | 6 +++++-
>  3 files changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
> index 0fef33a5a089..d1bc205eb5f8 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.c
> @@ -33,6 +33,8 @@ static const struct rzg2l_du_device_info rzg2l_du_r9a07g043u_info = {
>  		[RZG2L_DU_OUTPUT_DPAD0] = {
>  			.possible_outputs = BIT(0),
>  			.port = 0,
> +			.mode_clock_min = 20875,
> +			.mode_clock_max = 83500,
>  		},
>  	},
>  };
> @@ -47,6 +49,8 @@ static const struct rzg2l_du_device_info rzg2l_du_r9a07g044_info = {
>  		[RZG2L_DU_OUTPUT_DPAD0] = {
>  			.possible_outputs = BIT(0),
>  			.port = 1,
> +			.mode_clock_min = 20875,
> +			.mode_clock_max = 83500,
>  		}
>  	}
>  };
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
> index 58806c2a8f2b..307ae70dd382 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_drv.h
> @@ -30,6 +30,8 @@ enum rzg2l_du_output {
>   * struct rzg2l_du_output_routing - Output routing specification
>   * @possible_outputs: bitmask of possible outputs
>   * @port: device tree port number corresponding to this output route
> + * @mode_clock_min: minimum pixel clock in kHz
> + * @mode_clock_max: maximum pixel clock in kHz
>   *
>   * The DU has 2 possible outputs (DPAD0, DSI0). Output routing data
>   * specify the valid SoC outputs, which CRTC can drive the output, and the type
> @@ -38,6 +40,8 @@ enum rzg2l_du_output {
>  struct rzg2l_du_output_routing {
>  	unsigned int possible_outputs;
>  	unsigned int port;
> +	int mode_clock_min;
> +	int mode_clock_max;
>  };
>  
>  /*
> diff --git a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
> index 0e567b57a408..4af2ae09ff39 100644
> --- a/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
> +++ b/drivers/gpu/drm/renesas/rz-du/rzg2l_du_encoder.c
> @@ -50,8 +50,12 @@ rzg2l_du_encoder_mode_valid(struct drm_encoder *encoder,
>  			    const struct drm_display_mode *mode)
>  {
>  	struct rzg2l_du_encoder *renc = to_rzg2l_encoder(encoder);
> +	struct rzg2l_du_device *rcdu = to_rzg2l_du_device(renc->base.dev);
> +	const struct rzg2l_du_output_routing *route = &rcdu->info->routes[renc->output];
>  
> -	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;
>  
>  	return MODE_OK;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 4/5] drm: renesas: rz-du: Move mode_valid logic to per-output clock limits
  2026-05-13 23:02   ` Laurent Pinchart
@ 2026-05-14 12:56     ` Lad, Prabhakar
  0 siblings, 0 replies; 16+ messages in thread
From: Lad, Prabhakar @ 2026-05-14 12:56 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Biju Das, Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
	David Airlie, Simona Vetter, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Philipp Zabel, Geert Uytterhoeven, Magnus Damm,
	dri-devel, linux-renesas-soc, devicetree, linux-kernel,
	Fabrizio Castro, Lad Prabhakar

Hi Laurent,

Thank you for the review.

On Thu, May 14, 2026 at 12:02 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Tue, May 12, 2026 at 03:41:03PM +0100, Prabhakar wrote:
> > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >
> > Move pixel clock validation from a fixed encoder check to per-output
> > constraints stored in rzg2l_du_output_routing.
> >
> > Previously, rzg2l_du_encoder_mode_valid() applied a hard-coded 83.5 MHz
> > upper limit specifically for DPAD0. This approach cannot scale across the
> > RZ DU family because pixel clock limits vary per SoC and per output
> > interface.
> >
> > Add mode_clock_min and mode_clock_max fields to rzg2l_du_output_routing
> > so that clock constraints are expressed at the granularity of individual
> > output interfaces rather than globally per SoC. Update
> > rzg2l_du_encoder_mode_valid() to look up the routing entry for the active
> > output and return MODE_CLOCK_LOW or MODE_CLOCK_HIGH when the pixel clock
> > falls outside the declared range. A value of 0 for either field means no
> > bound is enforced in that direction.
> >
> > Set the DPAD0 pixel clock limits for RZ/G2UL (R9A07G043U) to 20.875 MHz
> > minimum and 83.5 MHz maximum. RZ/G2L and RZ/G2LC (R9A07G044) share the
> > same DPAD0 pixel clock limits.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> > v2->v3:
> > - Moved clock limits from device_info to output_routing to allow
> >   per-output constraints.
>
> Given that the DU has a single output, connected to multiple encoders,
> is the clock frequency limitation really a *per-output* property of the
> DU ? Clock constraints coming from encoders can be expressed in the
> respective bridge drivers (and the DSI encoder driver does so already).
>
For SoCs supporting DSI + DPI, the clock ranges vary for these
interfaces. For the DSI this is handled by the DSI encoder drivers,
but for DPI we must perform this check in the DU driver. Therefore, I
chose an approach involving a per-output clock range check.

Cheers,
Prabhakar

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 1/5] dt-bindings: display: renesas,rzg2l-du: Refuse port@1 for RZ/G2UL
  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   ` Rob Herring (Arm)
  2026-05-16  3:13   ` Claude review: dt-bindings: display: renesas, rzg2l-du: " Claude Code Review Bot
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring (Arm) @ 2026-05-14 13:20 UTC (permalink / raw)
  To: Prabhakar
  Cc: David Airlie, Magnus Damm, Biju Das, devicetree, Simona Vetter,
	Maarten Lankhorst, Tommaso Merciai, Maxime Ripard,
	Krzysztof Kozlowski, Conor Dooley, Lad Prabhakar,
	linux-renesas-soc, Geert Uytterhoeven, Laurent Pinchart,
	linux-kernel, dri-devel, Fabrizio Castro, Philipp Zabel,
	Thomas Zimmermann


On Tue, 12 May 2026 15:41:00 +0100, Prabhakar wrote:
> From: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> 
> The RZ/G2UL DU supports only a single port@0 DPI. Explicitly refuse
> port@1 in the ports node.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> Signed-off-by: Tommaso Merciai <tommaso.merciai.xr@bp.renesas.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v3:
> - Was orignally part of separate series [0]
> [0] https://lore.kernel.org/all/d1e0d4e0fe74e60345a3d043fb4f9128c1057638.1778141145.git.tommaso.merciai.xr@bp.renesas.com/
> ---
>  Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [PATCH v3 2/5] dt-bindings: display: renesas,rzg2l-du: Add RZ/T2H and RZ/N2H support
  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   ` Rob Herring (Arm)
  2026-05-16  3:13   ` Claude review: dt-bindings: display: renesas, rzg2l-du: " Claude Code Review Bot
  1 sibling, 0 replies; 16+ messages in thread
From: Rob Herring (Arm) @ 2026-05-14 15:23 UTC (permalink / raw)
  To: Prabhakar
  Cc: Krzysztof Kozlowski, Maarten Lankhorst, Biju Das, Simona Vetter,
	linux-renesas-soc, linux-kernel, David Airlie, Thomas Zimmermann,
	Lad Prabhakar, Geert Uytterhoeven, Magnus Damm, dri-devel,
	Fabrizio Castro, Conor Dooley, devicetree, Maxime Ripard,
	Laurent Pinchart, Philipp Zabel


On Tue, 12 May 2026 15:41:01 +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Document the Display Unit (DU) support for the RZ/T2H and RZ/N2H SoCs.
> 
> The DU block on RZ/T2H is functionally equivalent to the RZ/G2UL DU and
> supports the DPI interface, but includes SoC-specific register differences
> and has no reset control. Add a dedicated compatible string to represent
> this variant and update the allOf constraints accordingly.
> 
> As the DU implementation on RZ/N2H matches RZ/T2H, describe it using an
> RZ/N2H specific compatible string with the RZ/T2H compatible as fallback.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
> v2->v3:
> - No change
> 
> v1->v2:
> - Dropped the "port" property in favor of "ports" with a single port@0
>   child, to align with the existing RZ/G2L bindings and simplify the
>   device tree structure.
> - Updated the commit message to reflect the change from "port" to "ports".
> - Dropped RB tag from Rob due to above changes.
> ---
>  .../bindings/display/renesas,rzg2l-du.yaml    | 20 +++++++++++++++++--
>  1 file changed, 18 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 16+ messages in thread

* Claude review: Add DU support for RZ/T2H and RZ/N2H SoCs
  2026-05-12 14:40 [PATCH v3 0/5] Add DU support for RZ/T2H and RZ/N2H SoCs Prabhakar
                   ` (4 preceding siblings ...)
  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 Code Review Bot
  5 siblings, 0 replies; 16+ messages in thread
From: Claude Code Review Bot @ 2026-05-16  3:13 UTC (permalink / raw)
  To: dri-devel-reviews

Overall Series Review

Subject: Add DU support for RZ/T2H and RZ/N2H SoCs
Author: Prabhakar <prabhakar.csengg@gmail.com>
Patches: 10
Reviewed: 2026-05-16T13:13:41.493803

---

This is a well-structured 5-patch series adding DU (Display Unit) support for Renesas RZ/T2H and RZ/N2H SoCs. The series properly separates concerns: binding changes first, followed by preparatory driver refactoring (optional reset, per-output clock limits), and finally the new SoC support. The code is clean and follows existing driver conventions. Laurent Pinchart has reviewed several patches already.

There is one notable issue in the DT binding patch (patch 2) regarding the `resets` if/else logic, and a minor concern about the reset-optional change silently accepting a missing reset on SoCs that require one. Otherwise the series looks good.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Claude review: dt-bindings: display: renesas, rzg2l-du: Refuse port@1 for RZ/G2UL
  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 Code Review Bot
  1 sibling, 0 replies; 16+ messages in thread
From: Claude Code Review Bot @ 2026-05-16  3:13 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Status: Looks good.**

This is a simple and correct binding constraint. RZ/G2UL only has a single DPI output (port@0), and this patch adds `port@1: false` to explicitly reject a second port in the DT:

```yaml
            port@0:
              description: DPI
+            port@1: false
```

This mirrors the existing pattern used for RZ/V2H(P) (`r9a09g057-du`) which already has `port@1: false` at line 136 of the current binding. Consistent and correct.

Has Reviewed-by from Laurent Pinchart.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Claude review: dt-bindings: display: renesas, rzg2l-du: Add RZ/T2H and RZ/N2H support
  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 Code Review Bot
  1 sibling, 0 replies; 16+ messages in thread
From: Claude Code Review Bot @ 2026-05-16  3:13 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Status: Has issues.**

The compatible string additions and the RZ/N2H fallback to RZ/T2H look correct:

```yaml
+          - renesas,r9a09g077-du # RZ/T2H
      - items:
+          - const: renesas,r9a09g087-du # RZ/N2H
+          - const: renesas,r9a09g077-du # RZ/T2H fallback
```

**Issue 1 — `resets` removal from global `required` plus if/else pattern:**

The patch removes `resets` from the global required list:

```yaml
-  - resets
```

And then adds an if/else block to conditionally require it:

```yaml
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: renesas,r9a09g077-du
+    then:
+      properties:
+        resets: false
+    else:
+      required:
+        - resets
```

The `else` clause applies to every `allOf` entry that **doesn't** match the `if`. In a JSON Schema `allOf` list, each `if/then/else` item is evaluated independently. Since this is its own standalone item in the `allOf` array, the `else` branch should correctly require `resets` for all non-RZ/T2H compatibles. However, this pattern is unusual in DT bindings — most schemas simply list conditional requirements via `if/then` without `else`. It works, but a reviewer may ask whether it would be clearer to keep `resets` in the global `required` list and only use `if/then` to mark `resets: false` for RZ/T2H, since the `else` with `required: [resets]` is redundant with having it in the global list. Worth checking whether the dt-bindings maintainers prefer one style or the other.

**Issue 2 — port@1 constraint scope:** The patch groups `r9a09g077-du` (RZ/T2H) with `r9a07g043u-du` (RZ/G2UL) in the existing `if` block for single-port-only SoCs:

```yaml
          contains:
-            const: renesas,r9a07g043u-du
+            enum:
+              - renesas,r9a07g043u-du
+              - renesas,r9a09g077-du
```

This correctly constrains RZ/T2H to port@0 only and inherits the `port@1: false` from patch 1. This is appropriate since RZ/T2H has only a DPI output.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Claude review: drm: renesas: rz-du: Make DU reset control optional for RZ/T2H support
  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 Code Review Bot
  0 siblings, 0 replies; 16+ messages in thread
From: Claude Code Review Bot @ 2026-05-16  3:13 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Status: Acceptable, minor concern.**

The change is a one-liner:

```c
-	rcrtc->rstc = devm_reset_control_get_shared(rcdu->dev, NULL);
+	rcrtc->rstc = devm_reset_control_get_optional_shared(rcdu->dev, NULL);
```

This is the right approach for RZ/T2H which has no reset line. However, `devm_reset_control_get_optional_shared()` returns `NULL` (not an error) when no reset is specified in DT. The existing callers `reset_control_deassert(rcrtc->rstc)` and `reset_control_assert(rcrtc->rstc)` (in `rzg2l_du_crtc_get` at ~line 190 and `rzg2l_du_crtc_put` at line 210) are safe because the reset control API accepts `NULL` and treats it as a no-op. So this is correct.

**Minor concern:** By making the reset universally optional in the driver, a misconfigured DT for RZ/G2L/G2UL (which *does* require a reset) would silently succeed at probe time rather than failing early. The DT binding schema should catch this, but the driver loses its own defensive check. This is an acceptable tradeoff given that the binding enforces `resets` for non-RZ/T2H SoCs, and Laurent has already reviewed this.

Has Reviewed-by from Laurent Pinchart.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Claude review: drm: renesas: rz-du: Move mode_valid logic to per-output clock limits
  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-16  3:13   ` Claude Code Review Bot
  1 sibling, 0 replies; 16+ messages in thread
From: Claude Code Review Bot @ 2026-05-16  3:13 UTC (permalink / raw)
  To: dri-devel-reviews

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

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Claude review: drm: renesas: rz-du: Add support for RZ/T2H SoC
  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 Code Review Bot
  0 siblings, 0 replies; 16+ messages in thread
From: Claude Code Review Bot @ 2026-05-16  3:13 UTC (permalink / raw)
  To: dri-devel-reviews

Patch Review

**Status: Looks good.**

This patch adds the device info, feature flag, and CRTC modification for RZ/T2H:

```c
+#define RZG2L_DU_FEATURE_DPIO_OE	BIT(0)	/* Has DPIO output enable control */
```

```c
+static const struct rzg2l_du_device_info rzg2l_du_r9a09g077_info = {
+	.channels_mask = BIT(0),
+	.routes = {
+		[RZG2L_DU_OUTPUT_DPAD0] = {
+			.possible_outputs = BIT(0),
+			.port = 0,
+			.mode_clock_min = 5000,
+			.mode_clock_max = 100000,
+		},
+	},
+	.features = RZG2L_DU_FEATURE_DPIO_OE,
+};
```

The `rzg2l_du_has()` helper is clean:

```c
+static inline bool rzg2l_du_has(struct rzg2l_du_device *rcdu,
+				unsigned int feature)
+{
+	return rcdu->info->features & feature;
+}
```

The CRTC start/stop modification correctly gates DPI_EN on the feature flag:

```c
+	u32 val = DU_MCR0_DI_EN;
+
+	if (start && rzg2l_du_has(rcdu, RZG2L_DU_FEATURE_DPIO_OE))
+		val |= DU_MCR0_DPI_EN;
+
+	writel(start ? val : 0, rcdu->mmio + DU_MCR0);
```

The DPI_EN bit is only asserted during start and cleared on stop (val becomes 0). This is correct behavior — the output enable should track the display state.

The clock limits (5–100 MHz) differ from the RZ/G2UL limits (20.875–83.5 MHz), which validates the per-output routing design from patch 4.

Has Reviewed-by from Laurent Pinchart.

**Summary:** The series is well-structured and mostly ready. The main point to address is whether the `if/then/else` pattern for `resets` in the binding (patch 2) follows the preferred DT schema style, or whether keeping `resets` in the global `required` and only adding an `if/then` override for RZ/T2H would be cleaner. The driver changes are correct and well-designed.

---
Generated by Claude Code Patch Reviewer

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2026-05-16  3:13 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 review: " Claude Code Review Bot
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox