aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Vivi <rodrigo.vivi@intel.com>2016-09-07 20:42:31 -0400
committerJani Nikula <jani.nikula@intel.com>2016-09-14 04:24:58 -0400
commit86dfb76cba284114cf586005cd943eeb6e4f328d (patch)
treea8f2ac1302a023cd12972b4714520947dac113dc
parent74712339a4fc0f4ddc710e6bca836a6b78b7d8de (diff)
Revert "drm/i915/psr: Make idle_frames sensible again"
This reverts commit 1c80c25fb622973dd135878e98d172be20859049 Author: Daniel Vetter <daniel.vetter@ffwll.ch> Date: Wed May 18 18:47:12 2016 +0200 drm/i915/psr: Make idle_frames sensible again There are panels that needs 4 idle frames before entering PSR, but VBT is unproperly set. Also lately it was identified that idle frame count calculated at HW can be off by 1, what makes the minimum of 2, at least. Without the current vbt+1 we are with the risk of having HW calculating 0 idle frames and entering PSR when it shouldn't. Regardless the lack of link training. [Jani: there is some disagreement on the explanation, but the commit regresses so revert it is.] References: http://marc.info/?i=20160904191153.GA2328@light.dominikbrodowski.net Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Jani Nikula <jani.nikula@intel.com> Cc: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Fixes: 1c80c25fb622 ("drm/i915/psr: Make idle_frames sensible again") Cc: drm-intel-fixes@lists.freedesktop.org # v4.8-rc1+ Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1473295351-8766-1-git-send-email-rodrigo.vivi@intel.com (cherry picked from commit 40918e0bb81be02f507a941f8b2741f0dc1771b0) Signed-off-by: Jani Nikula <jani.nikula@intel.com>
-rw-r--r--drivers/gpu/drm/i915/intel_psr.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 2b0d1baf15b3..cf171b4b8c67 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -255,14 +255,14 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp)
255 struct drm_i915_private *dev_priv = to_i915(dev); 255 struct drm_i915_private *dev_priv = to_i915(dev);
256 256
257 uint32_t max_sleep_time = 0x1f; 257 uint32_t max_sleep_time = 0x1f;
258 /* Lately it was identified that depending on panel idle frame count 258 /*
259 * calculated at HW can be off by 1. So let's use what came 259 * Let's respect VBT in case VBT asks a higher idle_frame value.
260 * from VBT + 1. 260 * Let's use 6 as the minimum to cover all known cases including
261 * There are also other cases where panel demands at least 4 261 * the off-by-one issue that HW has in some cases. Also there are
262 * but VBT is not being set. To cover these 2 cases lets use 262 * cases where sink should be able to train
263 * at least 5 when VBT isn't set to be on the safest side. 263 * with the 5 or 6 idle patterns.
264 */ 264 */
265 uint32_t idle_frames = dev_priv->vbt.psr.idle_frames + 1; 265 uint32_t idle_frames = max(6, dev_priv->vbt.psr.idle_frames);
266 uint32_t val = EDP_PSR_ENABLE; 266 uint32_t val = EDP_PSR_ENABLE;
267 267
268 val |= max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT; 268 val |= max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT;