From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Liu Ying <victor.liu@nxp.com>, Marek Vasut <marex@denx.de>,
Andrzej Hajda <andrzej.hajda@intel.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Robert Foss <rfoss@kernel.org>,
Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
Jonas Karlman <jonas@kwiboo.se>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Francesco Valla <francesco@valla.it>
Cc: Fabian Pflug <f.pflug@pengutronix.de>,
dri-devel@lists.freedesktop.org, imx@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/bridge: ldb: add support for an external bridge
Date: Tue, 28 Oct 2025 13:27:37 +0100 [thread overview]
Message-ID: <1944228.tdWV9SEqCh@steina-w> (raw)
In-Reply-To: <20251028-imx93_ldb_bridge-v1-1-fca2e7d60e0a@valla.it>
Hi Francesco,
Am Dienstag, 28. Oktober 2025, 13:12:29 CET schrieb Francesco Valla:
> One option for the LVDS port of the LDB is to be connected to an
> additional bridge, such as a LVDS to HDMI converter. Add support for
> such case, along with the direct connection to a panel.
>
> Signed-off-by: Francesco Valla <francesco@valla.it>
> ---
> I was trying to add display support for the i.MX93 FRDM on top of the
> patch sent some time ago by Fabian Pflug [1], using some of the work
> already done by Alexander Stein but not yet merged [2], but then I
> noticed that the support for LVDS-HDMI converter bridges was missing
> from the LDB driver already present for the i.MX93.
>
> Not a fail of the driver itself, obviously, but I wonder if/how the
> existing i.MX8MP setups (e.g.: [3]), which use the same driver, work
> correclty. Unfortunately I don't have the i.MX8MP hardware to test them.
>
> Anyhow, a patch for such setup is attached; it was tested on the i.MX93
> FRDM using [1] and [2] plus some more devicetree modifications.
>
> [1] https://lore.kernel.org/all/20251022-fpg-nxp-imx93-frdm-v3-1-03ec40a1ccc0@pengutronix.de
> [2] https://lore.kernel.org/all/20250304154929.1785200-1-alexander.stein@ew.tq-group.com
> [3] https://elixir.bootlin.com/linux/v6.17.5/source/arch/arm64/boot/dts/freescale/imx8mp-evk-lvds0-imx-dlvds-hdmi-channel0.dtso
>
> Regards,
> Francesco
> ---
> drivers/gpu/drm/bridge/fsl-ldb.c | 26 +++++++++++++++++---------
> 1 file changed, 17 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/fsl-ldb.c b/drivers/gpu/drm/bridge/fsl-ldb.c
> index 5c3cf37200bcee1db285c97e2b463c9355ee6acb..fad436f2e0bfac8b42096a6fcd0022da0f35284e 100644
> --- a/drivers/gpu/drm/bridge/fsl-ldb.c
> +++ b/drivers/gpu/drm/bridge/fsl-ldb.c
> @@ -294,7 +294,6 @@ 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;
>
> @@ -335,15 +334,24 @@ static int fsl_ldb_probe(struct platform_device *pdev)
> 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);
> - if (IS_ERR(fsl_ldb->panel_bridge))
> - return PTR_ERR(fsl_ldb->panel_bridge);
> + /* First try to get an additional bridge, if not found go for a panel */
> + fsl_ldb->panel_bridge = of_drm_find_bridge(panel_node);
> + if (fsl_ldb->panel_bridge) {
> + of_node_put(panel_node);
> + } else {
> + struct drm_panel *panel;
>
> + panel = of_drm_find_panel(panel_node);
> + of_node_put(panel_node);
> + if (IS_ERR(panel))
> + return dev_err_probe(dev, PTR_ERR(panel),
> + "Failed to find panel");
> +
> + fsl_ldb->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
> + if (IS_ERR(fsl_ldb->panel_bridge))
> + return dev_err_probe(dev, PTR_ERR(fsl_ldb->panel_bridge),
> + "Failed to add panel bridge");
> + }
Without looking into the details this somehow looks similar to
drm_of_find_panel_or_bridge(), or drmm_of_get_bridge for the managed variant.
Best regards,
Alexander
>
> if (fsl_ldb_is_dual(fsl_ldb)) {
> struct device_node *port1, *port2;
>
> ---
> base-commit: fd57572253bc356330dbe5b233c2e1d8426c66fd
> change-id: 20251028-imx93_ldb_bridge-3c011e7856dc
>
> Best regards,
>
--
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/
next prev parent reply other threads:[~2025-10-28 12:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-28 12:12 [PATCH] drm/bridge: ldb: add support for an external bridge Francesco Valla
2025-10-28 12:27 ` Alexander Stein [this message]
2025-10-28 16:01 ` Francesco Valla
2025-10-29 3:41 ` Liu Ying
2025-10-29 13:01 ` Francesco Valla
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=1944228.tdWV9SEqCh@steina-w \
--to=alexander.stein@ew.tq-group.com \
--cc=Laurent.pinchart@ideasonboard.com \
--cc=andrzej.hajda@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=f.pflug@pengutronix.de \
--cc=francesco@valla.it \
--cc=imx@lists.linux.dev \
--cc=jernej.skrabec@gmail.com \
--cc=jonas@kwiboo.se \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marex@denx.de \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=rfoss@kernel.org \
--cc=tzimmermann@suse.de \
--cc=victor.liu@nxp.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