Skip to content

Commit f5dee12

Browse files
committed
drm/nouveau/kms/nv50-: Explicitly check DPCD backlights for aux enable/brightness
Since we don't support hybrid AUX/PWM backlights in nouveau right now, let's add some explicit checks so that we don't break nouveau once we enable support for these backlights in other drivers. Reviewed-by: Karol Herbst <kherbst@redhat.com> Signed-off-by: Lyude Paul <lyude@redhat.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211105183342.130810-3-lyude@redhat.com
1 parent 04f0d6c commit f5dee12

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

drivers/gpu/drm/nouveau/nouveau_backlight.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,10 @@ nv50_backlight_init(struct nouveau_backlight *bl,
308308
if (ret < 0)
309309
return ret;
310310

311-
if (drm_edp_backlight_supported(edp_dpcd)) {
311+
/* TODO: Add support for hybrid PWM/DPCD panels */
312+
if (drm_edp_backlight_supported(edp_dpcd) &&
313+
(edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) &&
314+
(edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP)) {
312315
NV_DEBUG(drm, "DPCD backlight controls supported on %s\n",
313316
nv_conn->base.name);
314317

0 commit comments

Comments
 (0)