drm/i915: Fix cap check for intel_dp_aux_backlight driver
authorPuthikorn Voravootivat <puthik@chromium.org>
Thu, 11 May 2017 23:02:17 +0000 (16:02 -0700)
committerJani Nikula <jani.nikula@intel.com>
Fri, 12 May 2017 12:47:08 +0000 (15:47 +0300)
intel_dp_aux_backlight driver should check for the
DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP before enable the driver.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170511230225.142870-2-puthik@chromium.org
drivers/gpu/drm/i915/intel_dp_aux_backlight.c

index 6532e226db29b63da766a8571de231de4f7261f6..341bf2cb0c25cdc6d2f215468c8bdd094dc22104 100644 (file)
@@ -144,6 +144,7 @@ intel_dp_aux_display_control_capable(struct intel_connector *connector)
         */
        if (intel_dp->edp_dpcd[1] & DP_EDP_TCON_BACKLIGHT_ADJUSTMENT_CAP &&
            (intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_AUX_ENABLE_CAP) &&
+           (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_AUX_SET_CAP) &&
            !((intel_dp->edp_dpcd[1] & DP_EDP_BACKLIGHT_PIN_ENABLE_CAP) ||
              (intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))) {
                DRM_DEBUG_KMS("AUX Backlight Control Supported!\n");