[Intel-gfx] [PATCH] drm/i915: Use AUX for backlight only if eDP 1.4 or later
Jenny TC
jenny.tc at intel.com
Wed Jul 19 10:29:29 UTC 2017
With older panels, AUX pin for backlight doesn't work. On some
panels, this causes backlight issues on S3 resume. Enable the
feature only for eDP1.4 or later.
Fix-suggested-by: Puthikorn Voravootivat <puthik at chromium.org>
Signed-off-by: Jenny TC <jenny.tc at intel.com>
---
drivers/gpu/drm/i915/intel_dp_aux_backlight.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
index b25cd88..421f31f 100644
--- a/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
+++ b/drivers/gpu/drm/i915/intel_dp_aux_backlight.c
@@ -292,7 +292,7 @@ static int intel_dp_aux_setup_backlight(struct intel_connector *connector,
* via PWM pin or using AUX is better than using PWM pin.
*
* The heuristic to determine that using AUX pin is better than using PWM pin is
- * that the panel support any of the feature list here.
+ * that the panel is eDP 1.4 or later and support any of the feature list here
* - Regional backlight brightness adjustment
* - Backlight PWM frequency set
* - More than 8 bits resolution of brightness level
@@ -310,6 +310,10 @@ static int intel_dp_aux_setup_backlight(struct intel_connector *connector,
if (!(intel_dp->edp_dpcd[2] & DP_EDP_BACKLIGHT_BRIGHTNESS_PWM_PIN_CAP))
return true;
+ /* Enable this for eDP 1.4 panel or later. */
+ if (intel_dp->edp_dpcd[0] < DP_EDP_14)
+ return false;
+
/* Panel supports regional backlight brightness adjustment */
if (drm_dp_dpcd_readb(&intel_dp->aux, DP_EDP_GENERAL_CAP_3,
®_val) != 1) {
--
1.9.1
More information about the Intel-gfx
mailing list