Skip to content

Commit b48ccb1

Browse files
committed
drm-panel: If drm_panel_dp_aux_backlight() fails, don't fail panel probe
If we're using the AUX channel for eDP backlight and it fails to probe for some reason, let's _not_ fail the panel probe. At least one case where we could fail to init the backlight is because of a dead or physically missing panel. As talked about in detail in the earlier patch in this series, ("drm/panel-edp: If we fail to powerup/get EDID, use conservative timings"), this can cause the entire system's display pipeline to fail to come up and that's non-ideal. If we fail to init the backlight for some transitory reason, we should dig in and see if there's a way to fix this (perhaps retries?). Even in that case, though, having a panel whose backlight is stuck at 100% (the default, at least in the panel Samsung ATNA33XC20 I tested) is better than having no panel at all. Reviewed-by: Hsin-Yi Wang <[email protected]> Signed-off-by: Douglas Anderson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/20240325145626.3.I552e8af0ddb1691cc0fe5d27ea3d8020e36f7006@changeid
1 parent ce0ff22 commit b48ccb1

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

drivers/gpu/drm/panel/panel-edp.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -944,8 +944,14 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
944944
err = drm_panel_dp_aux_backlight(&panel->base, panel->aux);
945945
pm_runtime_mark_last_busy(dev);
946946
pm_runtime_put_autosuspend(dev);
947+
948+
/*
949+
* Warn if we get an error, but don't consider it fatal. Having
950+
* a panel where we can't control the backlight is better than
951+
* no panel.
952+
*/
947953
if (err)
948-
goto err_finished_pm_runtime;
954+
dev_warn(dev, "failed to register dp aux backlight: %d\n", err);
949955
}
950956

951957
drm_panel_add(&panel->base);

drivers/gpu/drm/panel/panel-samsung-atna33xc20.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,14 @@ static int atana33xc20_probe(struct dp_aux_ep_device *aux_ep)
328328
ret = drm_panel_dp_aux_backlight(&panel->base, aux_ep->aux);
329329
pm_runtime_mark_last_busy(dev);
330330
pm_runtime_put_autosuspend(dev);
331+
332+
/*
333+
* Warn if we get an error, but don't consider it fatal. Having
334+
* a panel where we can't control the backlight is better than
335+
* no panel.
336+
*/
331337
if (ret)
332-
return dev_err_probe(dev, ret,
333-
"failed to register dp aux backlight\n");
338+
dev_warn(dev, "failed to register dp aux backlight: %d\n", ret);
334339

335340
drm_panel_add(&panel->base);
336341

0 commit comments

Comments
 (0)