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/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver
Date: Sat, 16 May 2026 09:46:52 +1000	[thread overview]
Message-ID: <review-patch3-20260515-rcar-du-dsc-v2-3-f6b9240a1240@ideasonboard.com> (raw)
In-Reply-To: <20260515-rcar-du-dsc-v2-3-f6b9240a1240@ideasonboard.com>

Patch Review

**Status: Needs minor fixes**

**Error handling in atomic_enable:**

```c
+static void rcar_dsc_atomic_enable(struct drm_bridge *bridge,
+				   struct drm_atomic_state *state)
+{
+	struct rcar_dsc *dsc = bridge_to_rcar_dsc(bridge);
+
+	WARN_ON(clk_prepare_enable(dsc->clk));
+	WARN_ON(reset_control_deassert(dsc->rst));
+}
```

If `clk_prepare_enable()` fails, the code still proceeds to deassert the reset. The reset deassert will also likely fail or leave things in an inconsistent state. Consider returning early on clock failure:

```c
if (WARN_ON(clk_prepare_enable(dsc->clk)))
    return;
WARN_ON(reset_control_deassert(dsc->rst));
```

**Bridge reference for next_bridge:**

```c
+	dsc->bridge.next_bridge = of_drm_find_and_get_bridge(remote);
+	of_node_put(remote);
+	if (!dsc->bridge.next_bridge)
+		return -EPROBE_DEFER;
```

The use of `of_drm_find_and_get_bridge()` with direct assignment to `bridge.next_bridge` is correct — the bridge core will put the reference on bridge destruction. Using `devm_drm_of_get_bridge()` here would cause a double-put. Good.

However, returning `-EPROBE_DEFER` unconditionally for NULL means a DT misconfiguration (e.g. output port pointing to a non-bridge node) would cause infinite probe deferral. This is a common pattern in DRM drivers though, so it's acceptable, just worth being aware of.

**Unused mmio mapping:**

```c
+	dsc->mmio = devm_platform_ioremap_resource(pdev, 0);
```

The `mmio` is mapped but never read or written since the driver only operates in bypass mode. This is fine for correctness (it validates the resource exists), but could also be deferred to when DSC encoding support is added. Not a blocking issue.

**Kconfig structure:**

The two-config pattern (`DRM_RCAR_USE_DSC` bool + `DRM_RCAR_DSC` def_tristate) matches the existing pattern used by LVDS and MIPI DSI in this directory. The `select RESET_CONTROLLER` is appropriate.

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-15 23:46 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15  7:56 [PATCH v2 0/5] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
2026-05-15  7:56 ` [PATCH v2 1/5] clk: renesas: r8a779g0: Add DSC clock Tomi Valkeinen
2026-05-15 23:46   ` Claude review: " Claude Code Review Bot
2026-05-15  7:56 ` [PATCH v2 2/5] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings Tomi Valkeinen
2026-05-15 17:32   ` Conor Dooley
2026-05-15 23:46   ` Claude review: " Claude Code Review Bot
2026-05-15  7:56 ` [PATCH v2 3/5] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver Tomi Valkeinen
2026-05-15 23:46   ` Claude Code Review Bot [this message]
2026-05-15  7:56 ` [PATCH v2 4/5] drm/rcar-du: dsi: Support DSC in the pipeline Tomi Valkeinen
2026-05-15 23:46   ` Claude review: " Claude Code Review Bot
2026-05-15  7:56 ` [PATCH v2 5/5] arm64: dts: renesas: Add Renesas R-Car V4H DSC Tomi Valkeinen
2026-05-15 23:46   ` Claude review: " Claude Code Review Bot
2026-05-15  8:01 ` [PATCH v2 0/5] drm/rcar-du: Add support for DSI pipelines with DSC Geert Uytterhoeven
2026-05-15 23:46 ` Claude review: " Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-05-15  9:09 [PATCH v3 0/7] " Tomi Valkeinen
2026-05-15  9:09 ` [PATCH v3 3/7] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver Tomi Valkeinen
2026-05-15 23:29   ` Claude review: " Claude Code Review Bot
2026-05-14 12:24 [PATCH 0/5] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
2026-05-14 12:24 ` [PATCH 3/5] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver Tomi Valkeinen
2026-05-16  0:53   ` 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-patch3-20260515-rcar-du-dsc-v2-3-f6b9240a1240@ideasonboard.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