From: Claude Code Review Bot <claude-review@example.com>
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 [thread overview]
Message-ID: <review-patch6-20260320-drm-lcdif-dbanc-v1-6-479a04133e70@bootlin.com> (raw)
In-Reply-To: <20260320-drm-lcdif-dbanc-v1-6-479a04133e70@bootlin.com>
Patch Review
This is the key enabling patch. Moving the lookup from probe to attach breaks 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) =
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) =
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_parse_dt()` returned `-EPROBE_DEFER` in this case. Consider adding a NULL check on `next_bridge` and returning `-EPROBE_DEFER` to maintain the probe deferral behavior. Without this, the attach would fail hard instead of deferring.
**Semantic change:** The old code returned `-ENODEV` when the remote node was missing in DT; the new code returns `-EPROBE_DEFER`. Since the WARN_ON in patch 5 guards the `!output_port` case, and if `output_port` is set but there's no remote in DT, `-EPROBE_DEFER` may not be the right error — the node might simply not exist. However, with the overlay fixup in patch 7, this becomes a timing issue, so `-EPROBE_DEFER` is arguably more appropriate.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-21 17:48 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 10:46 [PATCH 0/8] drm/mxsfb/lcdif: use DRM_BRIDGE_ATTACH_NO_CONNECTOR and the bridge-connector Luca Ceresoli
2026-03-20 10:46 ` [PATCH 1/8] drm/mxsfb/lcdif: simplify remote pointer management using __free Luca Ceresoli
2026-03-20 11:11 ` Luca Ceresoli
2026-03-21 17:48 ` Claude review: " Claude Code Review Bot
2026-03-20 10:46 ` [PATCH 2/8] drm/mxsfb/lcdif: don't unnecessarily loop over ports Luca Ceresoli
2026-03-21 17:48 ` Claude review: " Claude Code Review Bot
2026-03-20 10:46 ` [PATCH 3/8] drm/mxsfb/lcdif: use dev_err_probe() consistently in lcdif_attach_bridge Luca Ceresoli
2026-03-21 17:48 ` Claude review: " Claude Code Review Bot
2026-03-20 10:46 ` [PATCH 4/8] drm/bridge: dw-hdmi: document the output_port field Luca Ceresoli
2026-03-21 17:48 ` Claude review: " Claude Code Review Bot
2026-03-20 10:46 ` [PATCH 5/8] drm/bridge: dw-hdmi: warn on unsupported attach combination Luca Ceresoli
2026-03-21 17:48 ` Claude review: " Claude Code Review Bot
2026-03-20 10:46 ` [PATCH 6/8] drm/bridge: dw-hdmi: move next_bridge lookup to attach time Luca Ceresoli
2026-03-21 17:48 ` Claude Code Review Bot [this message]
2026-03-20 10:46 ` [PATCH 7/8] drm/bridge: imx8mp-hdmi-tx: add an hdmi-connector when missing using a DT overlay at boot time Luca Ceresoli
2026-03-21 17:48 ` Claude review: " Claude Code Review Bot
2026-03-20 10:46 ` [PATCH 8/8] drm/mxsfb/lcdif: use DRM_BRIDGE_ATTACH_NO_CONNECTOR and the bridge-connector Luca Ceresoli
2026-03-21 17:48 ` Claude review: " Claude Code Review Bot
2026-03-21 17:48 ` 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-patch6-20260320-drm-lcdif-dbanc-v1-6-479a04133e70@bootlin.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