Skip to contentSkip to conversation

drm/panel: panel-simple: Add dev_err_probe if backlight could not be found

PATCH Applied Alexander Stein 2 participants 2 messages Jun 21, 2022 – Jun 24, 2022

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

PATCH 1/1 drm/panel: panel-simple: Add dev_err_probe if backlight could not be found

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
---
 drivers/gpu/drm/panel/panel-simple.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-simple.c +3 -1
index 4a2e580a2f7b..8fb1c563c96a 100644
@@ -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);
 
Signature · 1 line
2.25.1
Applied
#1 lore raw
Quoted 11 lines · Alexander Stein

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

Thanks, applied to drm-misc (drm-misc-next)

Sam