[PATCH 1/1] drm/panel: panel-simple: Add dev_err_probe if backlight could not be found
Alexander Stein
alexander.stein at ew.tq-group.com
Tue Jun 21 07:21:18 UTC 2022
If the backlight node is not enabled, this (silently) returns with
-EPROBE_DEFER. /sys/kernel/debug/devices_deferred also shows nothing
helpful:
$ cat /sys/kernel/debug/devices_deferred
display
With this patch, there is a helpful hint:
$ cat /sys/kernel/debug/devices_deferred
display panel-simple: Could not find backlight
Signed-off-by: Alexander Stein <alexander.stein at ew.tq-group.com>
---
drivers/gpu/drm/panel/panel-simple.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 4a2e580a2f7b..8fb1c563c96a 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -663,8 +663,10 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
drm_panel_init(&panel->base, dev, &panel_simple_funcs, connector_type);
err = drm_panel_of_backlight(&panel->base);
- if (err)
+ if (err) {
+ dev_err_probe(dev, err, "Could not find backlight\n");
goto disable_pm_runtime;
+ }
drm_panel_add(&panel->base);
--
2.25.1
More information about the dri-devel
mailing list