Skip to content

Commit

Permalink
Revert "drm/i915/psr: Make idle_frames sensible again"
Browse files Browse the repository at this point in the history
This reverts

commit 1c80c25
Author: Daniel Vetter <[email protected]>
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/[email protected]
Cc: Dominik Brodowski <[email protected]>
Cc: Jani Nikula <[email protected]>
Cc: Daniel Vetter <[email protected]>
Signed-off-by: Rodrigo Vivi <[email protected]>
Fixes: 1c80c25 ("drm/i915/psr: Make idle_frames sensible again")
Cc: [email protected] # v4.8-rc1+
Signed-off-by: Jani Nikula <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 40918e0)
Signed-off-by: Jani Nikula <[email protected]>
  • Loading branch information
rodrigovivi authored and jnikula committed Sep 14, 2016
1 parent 7471233 commit 86dfb76
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions drivers/gpu/drm/i915/intel_psr.c
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,14 @@ static void hsw_psr_enable_source(struct intel_dp *intel_dp)
struct drm_i915_private *dev_priv = to_i915(dev);

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

val |= max_sleep_time << EDP_PSR_MAX_SLEEP_TIME_SHIFT;
Expand Down

0 comments on commit 86dfb76

Please sign in to comment.