From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/bridge: imx8mp-hdmi-tx: add an hdmi-connector when missing using a DT overlay at boot time
Date: Sun, 22 Mar 2026 03:48:38 +1000 [thread overview]
Message-ID: <review-patch7-20260320-drm-lcdif-dbanc-v1-7-479a04133e70@bootlin.com> (raw)
In-Reply-To: <20260320-drm-lcdif-dbanc-v1-7-479a04133e70@bootlin.com>
Patch Review
This is the most complex and controversial patch. The approach is reasonable and has precedent (`drm/tilcdc`).
**Observations on the C code (`imx8mp-hdmi-tx-connector-fixup.c`):**
1. The hardcoded path `/soc@0/bus@32c00000/hdmi@32fd8000` is fragile — it only works for i.MX8MP and assumes a specific DT structure. However, since the Kconfig already ties this to `DRM_IMX8MP_DW_HDMI_BRIDGE`, this is acceptable.
2. The `hdmi_conn` lookup after overlay application seems unnecessary:
```c
hdmi_conn = of_find_node_by_name(NULL, "fixup-hdmi-connector");
if (!hdmi_conn) {
err = -ENODEV;
goto overlay_remove;
}
```
If the overlay applied successfully, the node should always exist. This looks like a sanity check, but the `hdmi_conn` variable is declared with `__free(device_node)` and then never used beyond the NULL check. This is fine for validation but could use a comment explaining it's a sanity check.
3. The overlay is never removed on module exit / cleanup (no `module_exit`). Since this is `bool` (not tristate) in Kconfig, there's no module unload path, which is fine. But this means the overlay ID `ovcs_id` is a dead store if the function succeeds — not a real issue but worth noting.
4. Using `subsys_initcall` is the right level to ensure this runs before device probing.
**On the DT overlay (`imx8mp-hdmi-tx-connector-fixup.dtso`):**
The overlay looks correct. It adds the `fixup-hdmi-connector` node at the root and links it bidirectionally to `port@1` of the HDMI TX.
**One-line change in `imx8mp-hdmi-tx.c`:**
```c
plat_data->output_port = 1;
```
This enables the "case B" mode in dw-hdmi. This is correct and is the key change that makes the HDMI pipeline work with `DRM_BRIDGE_ATTACH_NO_CONNECTOR`. However, this change also affects the non-`DRM_BRIDGE_ATTACH_NO_CONNECTOR` path — in the current tree, dw-hdmi will now call `dw_hdmi_parse_dt()` at probe time, which will look for a remote on port@1. For boards that already have an hdmi-connector in DT this is fine, but for boards that don't (and don't have the fixup), `dw_hdmi_parse_dt()` would return `-ENODEV` and **probe would fail**. This is only safe because patch 6 removes `dw_hdmi_parse_dt()` entirely — so patches 6 and 7 must be applied together (bisectability concern if the `output_port = 1` line were in a separate patch from patch 6, but since patch 6 comes first, bisecting should be fine).
---
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 review: " Claude Code Review Bot
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 Code Review Bot [this message]
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-patch7-20260320-drm-lcdif-dbanc-v1-7-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