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 10:53:55 +1000	[thread overview]
Message-ID: <review-patch4-20260514-rcar-du-dsc-v1-4-d65f7a9e9841@ideasonboard.com> (raw)
In-Reply-To: <20260514-rcar-du-dsc-v1-4-d65f7a9e9841@ideasonboard.com>

Patch Review

**Status: Design concern, otherwise fine.**

The core approach is pragmatic: when the CRTC calls `rcar_mipi_dsi_pclk_enable()` with a bridge that might be the DSC (not DSI), resolve through to the actual DSI bridge by checking `bridge->funcs`:

```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;
}
```

**Design concern - function pointer comparison for bridge identification:**

Comparing `bridge->funcs` against `&rcar_mipi_dsi_bridge_ops` works but creates a tight coupling between the DSI driver and whatever bridges might appear in the chain. If another bridge type were ever inserted, this would break silently. The comment correctly acknowledges this:

```c
/* We detect the DSI bridge via bridge->funcs, and assume the
 * next_bridge is the DSI bridge. */
```

An alternative would be to walk the bridge chain until a DSI bridge is found (checking all bridges, not just the first two). However, for this specific hardware topology where there's at most one intermediate bridge, the current approach is acceptable. Just be aware this won't generalize.

**Minor:** The forward declaration of `rcar_mipi_dsi_bridge_ops` is necessary and correct:

```c
static const struct drm_bridge_funcs rcar_mipi_dsi_bridge_ops;
```

The function is used before its definition, so this is fine.

---

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-16  0:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 1/5] clk: renesas: r8a779g0: Add DSC clock Tomi Valkeinen
2026-05-16  0:53   ` Claude review: " Claude Code Review Bot
2026-05-14 12:24 ` [PATCH 2/5] dt-bindings: display: bridge: Document Renesas R-Car V4H DSC bindings Tomi Valkeinen
2026-05-14 13:47   ` Rob Herring (Arm)
2026-05-16  0:53   ` Claude review: " Claude Code Review Bot
2026-05-14 12:24 ` [PATCH 3/5] drm/rcar-du: dsc: Add rudimentary Renesas R-Car V4H DSC driver Tomi Valkeinen
2026-05-15  7:49   ` Geert Uytterhoeven
2026-05-15  8:02     ` Tomi Valkeinen
2026-05-15  8:05       ` Geert Uytterhoeven
2026-05-15  8:17         ` Tomi Valkeinen
2026-05-15  8:47           ` Geert Uytterhoeven
2026-05-15  9:29   ` Philipp Zabel
2026-05-16  0:53   ` Claude review: " Claude Code Review Bot
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 Code Review Bot [this message]
2026-05-14 12:24 ` [PATCH 5/5] arm64: dts: renesas: Add Renesas R-Car V4H DSC Tomi Valkeinen
2026-05-16  0:53   ` Claude review: " Claude Code Review Bot
2026-05-16  0:53 ` 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 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  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 4/7] drm/rcar-du: dsi: Support DSC in the pipeline Tomi Valkeinen
2026-05-15 23:29   ` 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-20260514-rcar-du-dsc-v1-4-d65f7a9e9841@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