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:29:58 +1000 [thread overview]
Message-ID: <review-patch3-20260515-rcar-du-dsc-v3-3-164157820498@ideasonboard.com> (raw)
In-Reply-To: <20260515-rcar-du-dsc-v3-3-164157820498@ideasonboard.com>
Patch Review
This is the core driver and has several items worth addressing:
**Bridge reference leak**: `of_drm_find_and_get_bridge()` increments the bridge refcount (as documented: "The refcount of the returned bridge is incremented. Use drm_bridge_put() when done with it."). The driver never calls `drm_bridge_put()` on `dsc->bridge.next_bridge`, leaking the reference. Compare with `rcar_lvds.c` which properly calls `drm_bridge_put(lvds->companion)` in its destroy callback for bridges obtained via `of_drm_find_and_get_bridge()`. This should be fixed.
```c
+ dsc->bridge.next_bridge = of_drm_find_and_get_bridge(remote);
+ of_node_put(remote);
+ if (!dsc->bridge.next_bridge)
+ return -EPROBE_DEFER;
```
**Use `devm_pm_runtime_enable`**: The probe/remove pair of `pm_runtime_enable` / `pm_runtime_disable` can be replaced with `devm_pm_runtime_enable(&pdev->dev)` in probe, eliminating the need for `rcar_dsc_remove()` entirely. This is the modern pattern and avoids ordering bugs.
```c
+static void rcar_dsc_remove(struct platform_device *pdev)
+{
+ pm_runtime_disable(&pdev->dev);
+}
```
**`-EPROBE_DEFER` without `dev_err_probe`**: When `of_drm_find_and_get_bridge()` returns NULL, the driver returns `-EPROBE_DEFER` silently. Using `return dev_err_probe(dev, -EPROBE_DEFER, "failed to find next bridge\n")` would suppress the message during deferred probing but log it if probe ultimately fails, which aids debugging.
**Unused MMIO mapping**: `dsc->mmio` is mapped but never accessed since this is bypass-mode only. This is fine for a rudimentary/initial driver, but it would be helpful to add a brief note in the commit message that the MMIO is mapped for future DSC encoding support. (No code change needed, just a documentation note.)
**`mode_valid` clock check**: The comment says "Really 400 Mpixel/s" but `mode->clock` is in kHz, and the check `mode->clock > 400000` limits to 400 MHz pixel clock. Whether 400 MHz clock equals 400 Mpixel/s depends on the pixel format — they're the same only for single-pixel-per-clock. If the hardware limit is truly 400 Mpixel/s and the DSC block always processes one pixel per clock, the check is correct. Worth confirming this assumption.
```c
+ if (mode->clock > 400000) /* Really 400 Mpixel/s */
+ return MODE_CLOCK_HIGH;
```
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-15 23:29 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-15 9:09 [PATCH v3 0/7] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
2026-05-15 9:09 ` [PATCH v3 1/7] clk: renesas: r8a779g0: Add DSC clock Tomi Valkeinen
2026-05-15 23:29 ` Claude review: " Claude Code Review Bot
2026-05-15 9:09 ` [PATCH v3 2/7] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings Tomi Valkeinen
2026-05-15 23:29 ` Claude review: " Claude Code Review Bot
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 Code Review Bot [this message]
2026-05-15 9:09 ` [PATCH v3 4/7] drm/rcar-du: dsi: Support DSC in the pipeline Tomi Valkeinen
2026-05-15 23:29 ` Claude review: " Claude Code Review Bot
2026-05-15 9:09 ` [PATCH v3 5/7] arm64: dts: renesas: r8a779g0: Add DSC Tomi Valkeinen
2026-05-15 23:29 ` Claude review: " Claude Code Review Bot
2026-05-15 9:09 ` [PATCH v3 6/7] arm64: dts: renesas: sparrow-hawk: Enable DisplayPort by adding DSC Tomi Valkeinen
2026-05-15 23:29 ` Claude review: " Claude Code Review Bot
2026-05-15 9:09 ` [PATCH v3 7/7] arm64: dts: renesas: white-hawk: Add second mini-DP output support Tomi Valkeinen
2026-05-15 23:29 ` Claude review: " Claude Code Review Bot
2026-05-15 23:29 ` Claude review: drm/rcar-du: Add support for DSI pipelines with DSC Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-05-15 7:56 [PATCH v2 0/5] " Tomi Valkeinen
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 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-v3-3-164157820498@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