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: dsi: Support DSC in the pipeline
Date: Sat, 16 May 2026 09:46:53 +1000	[thread overview]
Message-ID: <review-patch4-20260515-rcar-du-dsc-v2-4-f6b9240a1240@ideasonboard.com> (raw)
In-Reply-To: <20260515-rcar-du-dsc-v2-4-f6b9240a1240@ideasonboard.com>

Patch Review

**Status: Looks good, design comment**

The core problem is that `rcdu->dsi[]` stores the first bridge on the DSI output path. With DSC inserted, that's now the DSC bridge, not the DSI bridge. The `rcar_mipi_dsi_pclk_enable/disable` functions need the actual DSI bridge.

**Bridge resolution approach:**

```c
+static struct drm_bridge *
+rcar_mipi_dsi_resolve_bridge(struct drm_bridge *bridge)
+{
+	if (bridge->funcs != &rcar_mipi_dsi_bridge_ops)
+		bridge = bridge->next_bridge;
+
+	if (!bridge || bridge->funcs != &rcar_mipi_dsi_bridge_ops)
+		return NULL;
+
+	return bridge;
+}
```

Using `bridge->funcs` pointer comparison to identify the DSI bridge is pragmatic and works for this hardware topology. The function handles both cases (direct DSI or DSC→DSI) cleanly. The `WARN_ON` at call sites ensures misconfigured DT would be noticed.

The forward declaration of `rcar_mipi_dsi_bridge_ops` is necessary since the struct definition is at line 923, after the functions using it. This is fine.

The comment block above `rcar_mipi_dsi_resolve_bridge` clearly documents the assumption that `next_bridge` is the DSI bridge, which is good.

One thing to note: `bridge->next_bridge` here refers to the `struct drm_bridge` field set during probe (in the DSC driver), not the chain built by `drm_bridge_attach`. This is correct because the DSC driver sets `dsc->bridge.next_bridge` in its probe function pointing to the DSI bridge.

---

---
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 review: " Claude Code Review Bot
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 Code Review Bot [this message]
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 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-14 12:24 [PATCH 0/5] drm/rcar-du: Add support for DSI pipelines with DSC Tomi Valkeinen
2026-05-14 12:24 ` [PATCH 4/5] drm/rcar-du: dsi: Support DSC in the pipeline 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-patch4-20260515-rcar-du-dsc-v2-4-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