From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: drm: renesas: rz-du: Add support for RZ/T2H SoC Date: Tue, 05 May 2026 11:22:43 +1000 Message-ID: In-Reply-To: <20260429170012.366537-5-prabhakar.mahadev-lad.rj@bp.renesas.com> References: <20260429170012.366537-1-prabhakar.mahadev-lad.rj@bp.renesas.com> <20260429170012.366537-5-prabhakar.mahadev-lad.rj@bp.renesas.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review The core enablement patch. Adds the device info, feature flag, and DPI outp= ut enable handling. **The feature flag design is clean:** ```c #define RZG2L_DU_FEATURE_DPIO_OE BIT(0) static inline bool rzg2l_du_has(struct rzg2l_du_device *rcdu, unsigned int feature) { return rcdu->info->features & feature; } ``` **The start/stop logic looks correct:** ```c static void rzg2l_du_start_stop(struct rzg2l_du_crtc *rcrtc, bool start) { struct rzg2l_du_device *rcdu =3D rcrtc->dev; + u32 val =3D DU_MCR0_DI_EN; =20 - writel(start ? DU_MCR0_DI_EN : 0, rcdu->mmio + DU_MCR0); + if (start && rzg2l_du_has(rcdu, RZG2L_DU_FEATURE_DPIO_OE)) + val |=3D DU_MCR0_DPI_EN; + + writel(start ? val : 0, rcdu->mmio + DU_MCR0); } ``` When `start` is false, the write is `0` regardless =E2=80=94 clearing both = DI_EN and DPI_EN. When `start` is true, DPI_EN is conditionally ORed in. Th= is is correct. **Issue 1 =E2=80=94 `val` initialization is misleading when `start` is fals= e:** `val` is always initialized to `DU_MCR0_DI_EN` even when `start` is false, = in which case it's unused (the ternary writes `0`). This is harmless but sl= ightly confusing =E2=80=94 a reader might wonder if `val` matters when `sta= rt` is false. The logic is correct but could be clearer with a restructure.= Very minor. **Issue 2 =E2=80=94 RZ/T2H device info uses `.port =3D 0` for DPAD0:** ```c +static const struct rzg2l_du_device_info rzg2l_du_r9a09g077_info =3D { + .channels_mask =3D BIT(0), + .routes =3D { + [RZG2L_DU_OUTPUT_DPAD0] =3D { + .possible_outputs =3D BIT(0), + .port =3D 0, + }, + }, ``` This matches the DT binding where T2H uses a bare `port` instead of `ports/= port@0`. But the driver's `rzg2l_du_modeset_init()` function uses `of_graph= _get_remote_node()` which takes a port number. We should verify that `of_gr= aph_get_remote_node(rcdu->dev->of_node, 0, 0)` works with a bare `port` pro= perty (no `ports` container). The OF graph API does support bare `port` nod= es =E2=80=94 it falls through from looking for `ports/port@N` to looking fo= r `port` when there's only one port. So this should work, but it's worth a = quick sanity check. **Issue 3 =E2=80=94 The `features` field doc appears in patch 4 but struct = changes span patches 3 and 4:** In patch 3, `mode_clock_min` and `mode_clock_max` are added to the struct w= ith documentation. In patch 4, `features` is added. The kernel-doc comment = for the struct is updated incrementally across both patches, which is fine. **Overall the patch is clean.** The feature flag mechanism and conditional = DPI_EN assertion are well done. --- Generated by Claude Code Patch Reviewer