Re: [PATCH] drm/bridge: fsl-ldb: support downstream bridges in addition to panels

From: Laurentiu Palcu

Date: Thu Apr 16 2026 - 03:42:34 EST


Hi Xiaolei,

On Wed, Apr 08, 2026 at 03:28:02PM +0800, Xiaolei Wang wrote:
> 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.

There's already a patch sent out for this:
https://lore.kernel.org/all/20260304-dcif-upstreaming-v8-2-bec5c047edd4@xxxxxxxxxxx/

>
> Signed-off-by: Xiaolei Wang <xiaolei.wang@xxxxxxxxxxxxx>
> ---
> 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
>

--
Thanks,
Laurentiu