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/rcar-du: dsi: Support DSC in the pipeline Date: Sat, 16 May 2026 10:53:55 +1000 Message-ID: In-Reply-To: <20260514-rcar-du-dsc-v1-4-d65f7a9e9841@ideasonboard.com> References: <20260514-rcar-du-dsc-v1-0-d65f7a9e9841@ideasonboard.com> <20260514-rcar-du-dsc-v1-4-d65f7a9e9841@ideasonboard.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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