[PATCH v2 11/11] video: simple-panel: lazily resolve backlight without failing
Johannes Schneider
johannes.schneider at leica-geosystems.com
Wed Jun 3 23:50:06 PDT 2026
simple_panel_enable() returned -ENODEV when of_backlight_find() came
back NULL at the moment of VPL_ENABLE. With deep-probe, or simply
when the panel binds before its pwm-backlight, the first call sees
NULL -- and we'd then skip the regulator and enable-GPIO assertion
entirely, leaving the panel dark even though scanout was already
running into it.
Try the lookup on each enable, but if it isn't there yet just skip
the brightness_default() call and proceed with the rest of the panel
power-up. Board code that drives the backlight separately still
works; the panel re-resolves on the next VPL_ENABLE.
Signed-off-by: Johannes Schneider <johannes.schneider at leica-geosystems.com>
---
drivers/video/simple-panel.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/video/simple-panel.c b/drivers/video/simple-panel.c
index 66d519425a..8ffb6db6f6 100644
--- a/drivers/video/simple-panel.c
+++ b/drivers/video/simple-panel.c
@@ -36,13 +36,9 @@ static int simple_panel_enable(struct simple_panel *panel)
dev_dbg(panel->dev, "enabling\n");
- if (panel->backlight_node && !panel->backlight) {
+ /* resolve lazily; backlight may probe after us */
+ if (panel->backlight_node && !panel->backlight)
panel->backlight = of_backlight_find(panel->backlight_node);
- if (!panel->backlight) {
- dev_err(panel->dev, "Cannot find backlight\n");
- return -ENODEV;
- }
- }
regulator_enable(panel->power);
--
2.43.0
More information about the barebox
mailing list