]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Only set the down rps limit when at the loweset frequency
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Jul 2012 09:16:14 +0000 (11:16 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 26 Jul 2012 11:29:30 +0000 (13:29 +0200)
commit4bf83e9474f1e4b18e90b4f006273c6668cbd6e2
tree1b5aa011ce1cb8d64437660c14a3057b99b92bcd
parent0004bd3ade7d509d3db70f7b54b53b9be9b70901
drm/i915: Only set the down rps limit when at the loweset frequency

The power docs say that when the gt leaves rc6, it is in the lowest
frequency and only about 25 usec later will switch to the frequency
selected in GEN6_RPNSWREQ. If the downclock limit expires in that
window and the down limit is set to the lowest possible frequency, the
hw will not send the down interrupt. Which leads to a too high gpu
clock and wasted power.

Chris Wilson already worked on this with

commit e807388d48403985d332fb3a096266040ef11e37
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Apr 28 08:56:39 2012 +0100

    drm/i915: Always update RPS interrupts thresholds along with
    frequency

but got the logic inverted: The current code set the down limit as
long as we haven't reached it. Instead of only once with reached the
lowest frequency.

Note that we can't always set the downclock limit to 0, because
otherwise the hw will keep on bugging us with downclock request irqs
once the lowest level is reached.

For similar reasons also always set the upclock limit, otherwise the
hw might poke us again with interrupts.

v2: Chris Wilson noticed that the limit reg is also computed in
sanitize_pm. To avoid duplication, extract the code into a common
function.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c