]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/panel: panel-simple: Add dev_err_probe if backlight could not be found
authorAlexander Stein <alexander.stein@ew.tq-group.com>
Tue, 21 Jun 2022 07:21:18 +0000 (09:21 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Fri, 24 Jun 2022 19:34:44 +0000 (21:34 +0200)
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@ew.tq-group.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220621072118.513346-1-alexander.stein@ew.tq-group.com
drivers/gpu/drm/panel/panel-simple.c

index 4f15f6d1b430704df86df0e65d462dda6d4ed6a1..ad3434550a94f3ebee0292b740dfde7837dc0249 100644 (file)
@@ -675,8 +675,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);