Skip to content

Commit 40918e0

Browse files
rodrigovivijnikula
authored andcommitted
Revert "drm/i915/psr: Make idle_frames sensible again"
This reverts commit 1c80c25 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: 1c80c25 ("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
1 parent 2686ebf commit 40918e0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/gpu/drm/i915/intel_psr.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,14 +255,14 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp)
255255
struct drm_i915_private *dev_priv = to_i915(dev);
256256

257257
uint32_t max_sleep_time = 0x1f;
258-
/* Lately it was identified that depending on panel idle frame count
259-
* calculated at HW can be off by 1. So let's use what came
260-
* from VBT + 1.
261-
* There are also other cases where panel demands at least 4
262-
* but VBT is not being set. To cover these 2 cases lets use
263-
* at least 5 when VBT isn't set to be on the safest side.
258+
/*
259+
* Let's respect VBT in case VBT asks a higher idle_frame value.
260+
* Let's use 6 as the minimum to cover all known cases including
261+
* the off-by-one issue that HW has in some cases. Also there are
262+
* cases where sink should be able to train
263+
* with the 5 or 6 idle patterns.
264264
*/
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);
266266
uint32_t val = EDP_PSR_ENABLE;
267267

268268
val |= max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT;

0 commit comments

Comments
 (0)