summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRajeev Nandan <rajeevny@codeaurora.org>2021-06-26 19:51:04 +0300
committerDouglas Anderson <dianders@chromium.org>2021-07-09 16:47:55 +0300
commitbfd451403d70b13d22db097e4590fa80ba2160eb (patch)
tree2359bb78f85e07245288cf2b42311c29972acd3b /drivers
parent10f7b40e4f3050cd22a161f46a47564e8c5ce91f (diff)
downloadlinux-bfd451403d70b13d22db097e4590fa80ba2160eb.tar.xz
drm/panel-simple: Support DP AUX backlight
If there is no backlight specified in the device tree and the panel has access to the DP AUX channel then create a DP AUX backlight if supported by the panel. Signed-off-by: Rajeev Nandan <rajeevny@codeaurora.org> Reviewed-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/1624726268-14869-3-git-send-email-rajeevny@codeaurora.org
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/panel/panel-simple.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 78f0394e3b24..6f233f2a4e3d 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -800,6 +800,12 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc,
if (err)
goto disable_pm_runtime;
+ if (!panel->base.backlight && panel->aux) {
+ err = drm_panel_dp_aux_backlight(&panel->base, panel->aux);
+ if (err)
+ goto disable_pm_runtime;
+ }
+
drm_panel_add(&panel->base);
return 0;