[Intel-gfx] [PATCH 2/2] drm/i915/dp: check eDP display control capability registers
Jani Nikula
jani.nikula at intel.com
Fri Nov 15 14:01:51 CET 2013
Debug print the capabilities, and flag an error if the panel does not
support adjusting backlight through the BL_PWM_DIM pin, requiring
backlight control through DPCD.
I haven't seen such panels yet, but it's a matter of time. Give
ourselves a reminder when we need to fix this for real.
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index cbf33be..ea4f3d1 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2816,6 +2816,20 @@ intel_dp_get_dpcd(struct intel_dp *intel_dp)
dev_priv->psr.sink_support = true;
DRM_DEBUG_KMS("Detected EDP PSR Panel.\n");
}
+
+ if (intel_dp->dpcd[DP_EDP_CONFIGURATION_CAP] &
+ DP_DPCD_DISPLAY_CONTROL_CAP) {
+ u8 ctrl[4] = { 0 };
+
+ intel_dp_aux_native_read(intel_dp, DP_EDP_REV,
+ ctrl, sizeof(ctrl));
+ DRM_DEBUG_KMS("eDP DPCD CTRL %02x %02x %02x %02x\n",
+ ctrl[0], ctrl[1], ctrl[2], ctrl[3]);
+
+ /* We don't support DPCD backlight control yet. */
+ if (ctrl[0] && (ctrl[1] & 1) && !(ctrl[2] & 1))
+ DRM_ERROR("eDP AUX backlight control only\n");
+ }
}
if (!(intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT] &
--
1.7.9.5
More information about the Intel-gfx
mailing list