drivers/gpu/drm/bridge/fsl-ldb.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-)
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");
+ }
if (fsl_ldb_is_dual(fsl_ldb)) {
struct device_node *port1, *port2;
---
base-commit: fd57572253bc356330dbe5b233c2e1d8426c66fd
change-id: 20251028-imx93_ldb_bridge-3c011e7856dc
Best regards,
--
Francesco Valla <francesco@valla.it>
On 10/28/2025, Francesco Valla wrote:
> [You don't often get email from francesco@valla.it. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> 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.
[3] was in my previous patch series[a]. Only patch 6&7 of [a] are applied,
so for now [3] doesn't actually work with i.MX8MP.
And, patch 3 of [a] supports the external bridge this patch tries to support.
[b] is another patch series which includes my patch.
[a] https://patchwork.freedesktop.org/series/139266/#rev7
[b] https://patchwork.freedesktop.org/series/154381/
>
> 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");
> + }
>
> if (fsl_ldb_is_dual(fsl_ldb)) {
> struct device_node *port1, *port2;
>
> ---
> base-commit: fd57572253bc356330dbe5b233c2e1d8426c66fd
> change-id: 20251028-imx93_ldb_bridge-3c011e7856dc
>
> Best regards,
> --
> Francesco Valla <francesco@valla.it>
>
--
Regards,
Liu Ying
Hi, On Wednesday, 29 October 2025 at 04:41:51 Liu Ying <victor.liu@nxp.com> wrote: > On 10/28/2025, Francesco Valla wrote: > > 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. > > [3] was in my previous patch series[a]. Only patch 6&7 of [a] are applied, > so for now [3] doesn't actually work with i.MX8MP. > > And, patch 3 of [a] supports the external bridge this patch tries to support. > > [b] is another patch series which includes my patch. > > [a] https://patchwork.freedesktop.org/series/139266/#rev7 > [b] https://patchwork.freedesktop.org/series/154381/ > Thank you for your answer, it's much clearer now. I'll drop this one and wait for [b], then. BR, Francesco
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/
Hi,
On Tuesday, 28 October 2025 at 13:27:37 Alexander Stein <alexander.stein@ew.tq-group.com> wrote:
> 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,
> >
>
>
>
Well, I did not know of devm_drm_of_get_bridge(), and unfortunately the
driver I checked (Samsung DSIM) has not yet been updated to use it.
Sorry for the noise.
I'll wait for more feedback (if any) and then send a v2 - which looks
much cleaner now.
Thank you!
Regards,
Francesco
© 2016 - 2026 Red Hat, Inc.