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/bridge: dw-hdmi: move next_bridge lookup to attach time Date: Sun, 22 Mar 2026 03:48:38 +1000 Message-ID: In-Reply-To: <20260320-drm-lcdif-dbanc-v1-6-479a04133e70@bootlin.com> References: <20260320-drm-lcdif-dbanc-v1-0-479a04133e70@bootlin.com> <20260320-drm-lcdif-dbanc-v1-6-479a04133e70@bootlin.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 This is the key enabling patch. Moving the lookup from probe to attach brea= ks the devlink chicken-and-egg problem described in the commit message. The implementation looks correct. The new code in `dw_hdmi_bridge_attach()`: ```c struct device_node *remote __free(device_node) =3D of_graph_get_remote_node(hdmi->dev->of_node, hdmi->plat_data->output_port, -1); if (!remote) return -EPROBE_DEFER; struct drm_bridge *next_bridge __free(drm_bridge_put) =3D of_drm_find_and_get_bridge(remote); return drm_bridge_attach(encoder, next_bridge, bridge, flags); ``` **Potential issue:** If `of_drm_find_and_get_bridge()` returns NULL (bridge= not yet registered), `next_bridge` will be NULL and `drm_bridge_attach()` = will be called with a NULL bridge, returning `-EINVAL`. The old `dw_hdmi_pa= rse_dt()` returned `-EPROBE_DEFER` in this case. Consider adding a NULL che= ck on `next_bridge` and returning `-EPROBE_DEFER` to maintain the probe def= erral behavior. Without this, the attach would fail hard instead of deferri= ng. **Semantic change:** The old code returned `-ENODEV` when the remote node w= as missing in DT; the new code returns `-EPROBE_DEFER`. Since the WARN_ON i= n patch 5 guards the `!output_port` case, and if `output_port` is set but t= here's no remote in DT, `-EPROBE_DEFER` may not be the right error =E2=80= =94 the node might simply not exist. However, with the overlay fixup in pat= ch 7, this becomes a timing issue, so `-EPROBE_DEFER` is arguably more appr= opriate. --- Generated by Claude Code Patch Reviewer