]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
drm/i915: Fix idle_frames counter.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 7 Dec 2015 22:45:20 +0000 (14:45 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 7 Dec 2015 22:48:11 +0000 (14:48 -0800)
commitdfaf37baa07513d2c37afff79978807d2d10221a
tree88f67411f55e9c247a27f428e4b9fad2b2dc45fb
parent0d014ff344abc9c8e56cf1870ab3a144d2e2e37a
drm/i915: Fix idle_frames counter.

'commit 97173eaf5 ("drm/i915: PSR: Increase idle_frames")' was a mistake.
The special case it tried to cover was already being covered by
the DP_PSR_NO_TRAIN_ON_EXIT. So this ended up duplicated.

So, instead of reverting that let's take this opportunity and unify
the idle_frame definition in a single place so we standardize the access
and avoid room for that same mistake again.

Few changes with this patch:

1. Instead of just respecting the VBT we set a
global minumum with max(). So we are sure that we will avoid corner cases
in case VBT is doing something we don't understand.

2. Instead of minimum 5 we use 6. When introducing the idle_frames += 4 case
we considered that minimum was 2. All because the off-by-one issue.

v2: Unified idle_frame definition.

Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1449528320-27655-1-git-send-email-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/intel_psr.c