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 09:46:53 +1000 Message-ID: In-Reply-To: <20260515-rcar-du-dsc-v2-4-f6b9240a1240@ideasonboard.com> References: <20260515-rcar-du-dsc-v2-0-f6b9240a1240@ideasonboard.com> <20260515-rcar-du-dsc-v2-4-f6b9240a1240@ideasonboard.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **Status: Looks good, design comment** The core problem is that `rcdu->dsi[]` stores the first bridge on the DSI o= utput path. With DSC inserted, that's now the DSC bridge, not the DSI bridg= e. The `rcar_mipi_dsi_pclk_enable/disable` functions need the actual DSI br= idge. **Bridge resolution approach:** ```c +static struct drm_bridge * +rcar_mipi_dsi_resolve_bridge(struct drm_bridge *bridge) +{ + if (bridge->funcs !=3D &rcar_mipi_dsi_bridge_ops) + bridge =3D bridge->next_bridge; + + if (!bridge || bridge->funcs !=3D &rcar_mipi_dsi_bridge_ops) + return NULL; + + return bridge; +} ``` Using `bridge->funcs` pointer comparison to identify the DSI bridge is prag= matic and works for this hardware topology. The function handles both cases= (direct DSI or DSC=E2=86=92DSI) cleanly. The `WARN_ON` at call sites ensur= es misconfigured DT would be noticed. The forward declaration of `rcar_mipi_dsi_bridge_ops` is necessary since th= e struct definition is at line 923, after the functions using it. This is f= ine. The comment block above `rcar_mipi_dsi_resolve_bridge` clearly documents th= e assumption that `next_bridge` is the DSI bridge, which is good. One thing to note: `bridge->next_bridge` here refers to the `struct drm_bri= dge` field set during probe (in the DSC driver), not the chain built by `dr= m_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