Skip to contentSkip to conversation

drm/bridge: fsl-ldb: return -EPROBE_DEFER if the panel bridge is not found

PATCH Applied Dario Binacchi 3 participants 4 messages Oct 29 – Nov 5

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/bridge: fsl-ldb: return -EPROBE_DEFER if the panel bridge is not found

of_drm_find_and_get_bridge() returns NULL if the panel has not been registered yet. Returning -ENODEV in this case makes the probe fail instead of being retried, so the LDB is never bound and the display pipeline never comes up:

platform 32e90000.display-controller: deferred probe pending: imx-lcdif: Failed to get bridge for endpoint0

Return -EPROBE_DEFER, so that the probe is retried once the panel is available.

Fixes 802372cf316a ("drm/bridge: fsl-ldb: don't create a panel_bridge")

---

 drivers/gpu/drm/bridge/fsl-ldb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/fsl-ldb.c +1 -1
index 7ec84c81cd78..420b3e08130e 100644
@@ -342,7 +342,7 @@ static int fsl_ldb_probe(struct platform_device *pdev)
 	fsl_ldb->bridge.next_bridge = of_drm_find_and_get_bridge(panel_node);
 	of_node_put(panel_node);
 	if (!fsl_ldb->bridge.next_bridge)
-		return -ENODEV;
+		return -EPROBE_DEFER;
 
 	if (fsl_ldb_is_dual(fsl_ldb)) {
 		struct device_node *port1, *port2;

---
base-commit: c339f4010dea8b0d754f84ace70cd1b089878ef8
branch: fsl-ldb-defer-probe

Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Dario,

Quoted 23 lines · Dario Binacchi

of_drm_find_and_get_bridge() returns NULL if the panel has not been registered yet. Returning -ENODEV in this case makes the probe fail instead of being retried, so the LDB is never bound and the display pipeline never comes up:

platform 32e90000.display-controller: deferred probe pending: imx-lcdif: Failed to get bridge for endpoint0

Return -EPROBE_DEFER, so that the probe is retried once the panel is available.

Fixes 802372cf316a ("drm/bridge: fsl-ldb: don't create a panel_bridge")

---

 drivers/gpu/drm/bridge/fsl-ldb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/fsl-ldb.c +0 -0
index 7ec84c81cd78..420b3e08130e 100644

drivers/gpu/drm/bridge/fsl-ldb.c static int fsl_ldb_probe(struct platform_device *pdev) · line 345

Quoted 5 lines
drivers/gpu/drm/bridge/fsl-ldb.c +1 -1
@@ -342,7 +342,7 @@ static int fsl_ldb_probe(struct platform_device *pdev)
 	fsl_ldb->bridge.next_bridge = of_drm_find_and_get_bridge(panel_node);
 	of_node_put(panel_node);
 	if (!fsl_ldb->bridge.next_bridge)
-		return -ENODEV;
+		return -EPROBE_DEFER;

Hmm, I have a patch [1] in the DCIF series that adds support for non-panel bridges to fsl-ldb.c which, indirectly, should fix this as well. But, since I don't see that patchset merged anytime soon:

[1] https://lore.kernel.org/dri-devel/[email protected]/

Signature · 2 lines
Thanks,
Laurentiu
reviewer Reviewed-by on v1 1/1
#2 lore raw
In reply to Dario Binacchi
Quoted 5 lines · Dario Binacchi

of_drm_find_and_get_bridge() returns NULL if the panel has not been registered yet. Returning -ENODEV in this case makes the probe fail instead of being retried, so the LDB is never bound and the display pipeline never comes up:

Quoted 7 lines

platform 32e90000.display-controller: deferred probe pending: imx-lcdif: Failed to get bridge for endpoint0

Return -EPROBE_DEFER, so that the probe is retried once the panel is available.

Fixes 802372cf316a ("drm/bridge: fsl-ldb: don't create a panel_bridge")

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

reviewer Applied
#3 lore raw
In reply to Dario Binacchi
Quoted 8 lines · Dario Binacchi

of_drm_find_and_get_bridge() returns NULL if the panel has not been registered yet. Returning -ENODEV in this case makes the probe fail instead of being retried, so the LDB is never bound and the display pipeline never comes up:

platform 32e90000.display-controller: deferred probe pending: imx-lcdif: Failed to get bridge for endpoint0

[...]

Applied, thanks!

[1/1] drm/bridge: fsl-ldb: return -EPROBE_DEFER if the panel bridge is not found

      commit: ef08ae876d0641a5c8496008d35ceb0d6b1a92b9

Best regards,

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com