* [PATCH] drm/bridge: fsl-ldb: support downstream bridges in addition to panels
@ 2026-04-08 7:28 Xiaolei Wang
2026-04-12 2:59 ` Claude review: " Claude Code Review Bot
2026-04-12 2:59 ` Claude Code Review Bot
0 siblings, 2 replies; 3+ messages in thread
From: Xiaolei Wang @ 2026-04-08 7:28 UTC (permalink / raw)
To: andrzej.hajda, neil.armstrong, rfoss, Laurent.pinchart, jonas,
jernej.skrabec, maarten.lankhorst, mripard, tzimmermann, airlied,
simona, Xiaolei.Wang
Cc: dri-devel, linux-kernel
The fsl-ldb driver currently only supports connecting to a drm_panel
via of_drm_find_panel(). This prevents it from working with downstream
bridge chips such as the ITE IT6263 LVDS-to-HDMI converter.
Replace of_drm_find_panel() + devm_drm_panel_bridge_add() with
devm_drm_of_get_bridge(), which handles both panels and bridges.
This fixes the LVDS-to-HDMI display output path on i.MX8MP EVK.
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
---
drivers/gpu/drm/bridge/fsl-ldb.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/bridge/fsl-ldb.c b/drivers/gpu/drm/bridge/fsl-ldb.c
index 5c3cf37200bc..2936c945ba52 100644
--- a/drivers/gpu/drm/bridge/fsl-ldb.c
+++ b/drivers/gpu/drm/bridge/fsl-ldb.c
@@ -292,9 +292,7 @@ static const struct drm_bridge_funcs funcs = {
static int fsl_ldb_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
- struct device_node *panel_node;
struct device_node *remote1, *remote2;
- struct drm_panel *panel;
struct fsl_ldb *fsl_ldb;
int dual_link;
@@ -322,25 +320,18 @@ static int fsl_ldb_probe(struct platform_device *pdev)
remote2 = of_graph_get_remote_node(dev->of_node, 2, 0);
fsl_ldb->ch0_enabled = (remote1 != NULL);
fsl_ldb->ch1_enabled = (remote2 != NULL);
- panel_node = of_node_get(remote1 ? remote1 : remote2);
of_node_put(remote1);
of_node_put(remote2);
- if (!fsl_ldb->ch0_enabled && !fsl_ldb->ch1_enabled) {
- of_node_put(panel_node);
+ if (!fsl_ldb->ch0_enabled && !fsl_ldb->ch1_enabled)
return dev_err_probe(dev, -ENXIO, "No panel node found");
- }
dev_dbg(dev, "Using %s\n",
fsl_ldb_is_dual(fsl_ldb) ? "dual-link mode" :
fsl_ldb->ch0_enabled ? "channel 0" : "channel 1");
- panel = of_drm_find_panel(panel_node);
- of_node_put(panel_node);
- if (IS_ERR(panel))
- return PTR_ERR(panel);
-
- fsl_ldb->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
+ fsl_ldb->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node,
+ fsl_ldb->ch0_enabled ? 1 : 2, 0);
if (IS_ERR(fsl_ldb->panel_bridge))
return PTR_ERR(fsl_ldb->panel_bridge);
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Claude review: drm/bridge: fsl-ldb: support downstream bridges in addition to panels
2026-04-08 7:28 [PATCH] drm/bridge: fsl-ldb: support downstream bridges in addition to panels Xiaolei Wang
@ 2026-04-12 2:59 ` Claude Code Review Bot
2026-04-12 2:59 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:59 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/bridge: fsl-ldb: support downstream bridges in addition to panels
Author: Xiaolei Wang <xiaolei.wang@windriver.com>
Patches: 1
Reviewed: 2026-04-12T12:59:08.131190
---
This is a single-patch series that converts the fsl-ldb bridge driver from panel-only support to supporting both panels and downstream bridges (e.g., LVDS-to-HDMI converters). The approach — replacing `of_drm_find_panel()` + `devm_drm_panel_bridge_add()` with `devm_drm_of_get_bridge()` — is a well-established pattern used across many DRM bridge drivers. The transformation is logically correct, the port selection logic is preserved, and the DT binding already describes the output ports as accepting either "panel or bridge".
The patch will need a rebase: the current drm-next tree has an `nxp,enable-termination-resistor` property check (added by commit range after `5c3cf37200bc`) inserted between the code blocks the patch modifies, which explains the apply failure. After rebase, this should be a clean, straightforward change.
**Verdict:** Looks good with minor nits.
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
* Claude review: drm/bridge: fsl-ldb: support downstream bridges in addition to panels
2026-04-08 7:28 [PATCH] drm/bridge: fsl-ldb: support downstream bridges in addition to panels Xiaolei Wang
2026-04-12 2:59 ` Claude review: " Claude Code Review Bot
@ 2026-04-12 2:59 ` Claude Code Review Bot
1 sibling, 0 replies; 3+ messages in thread
From: Claude Code Review Bot @ 2026-04-12 2:59 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Correctness: Good**
The core logic is correct. `devm_drm_of_get_bridge()` internally calls `drm_of_find_panel_or_bridge()`, and if a panel is found, wraps it with `devm_drm_panel_bridge_add()` — so existing panel-only device trees continue to work unchanged. If a bridge is found, it's returned directly. Either way the result is a `struct drm_bridge *`, which is exactly what `fsl_ldb->panel_bridge` stores and what `fsl_ldb_attach()` passes to `drm_bridge_attach()`.
**Port selection logic: Correct**
```c
fsl_ldb->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node,
fsl_ldb->ch0_enabled ? 1 : 2, 0);
```
This correctly mirrors the original logic:
```c
panel_node = of_node_get(remote1 ? remote1 : remote2);
```
where `remote1` is from port 1 and `remote2` is from port 2. In the dual-link case (both channels enabled), both ports connect to the same downstream device, so picking port 1 is correct.
**Nit 1: Stale error message**
```c
if (!fsl_ldb->ch0_enabled && !fsl_ldb->ch1_enabled)
return dev_err_probe(dev, -ENXIO, "No panel node found");
```
Since the driver now supports bridges too, this message should say something like `"No panel or bridge node found"` or simply `"No remote node found"`.
**Nit 2: Unused include**
After this patch, nothing in the file uses `struct drm_panel`, `of_drm_find_panel()`, or any other symbol from `<drm/drm_panel.h>`. The include at the top of the file could be dropped since `devm_drm_of_get_bridge()` is declared in `<drm/drm_bridge.h>` (already included).
**Nit 3: Needs rebase**
The patch is based on tree state `5c3cf37200bc`, but current drm-next has additional code between the removed `of_node_put(panel_node)` and `devm_drm_panel_bridge_add()` calls — specifically the `nxp,enable-termination-resistor` property check at `fsl-ldb.c:347-348`. The patch will need a trivial rebase to resolve this context conflict. The `nxp,enable-termination-resistor` block should remain in place after the rebase.
**Non-issue (for context):** The struct member `panel_bridge` is now slightly misnamed since it can hold a non-panel bridge, but renaming it would be gratuitous churn and is fine to leave.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-12 2:59 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-08 7:28 [PATCH] drm/bridge: fsl-ldb: support downstream bridges in addition to panels Xiaolei Wang
2026-04-12 2:59 ` Claude review: " Claude Code Review Bot
2026-04-12 2:59 ` Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox