drm/i915: make sure GPU freq drops to minimum after entering RC6 v4
authorJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 23 Apr 2013 17:09:26 +0000 (10:09 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 24 Apr 2013 09:03:38 +0000 (11:03 +0200)
commit52ceb908018d3ac3c19cea85d5e407705f0a79c3
treea0e892b1b1130add7d0a1f067a5ed909fdb6c79d
parent30568c45d9fc4ee0bb9e1da90e185692fcd67e38
drm/i915: make sure GPU freq drops to minimum after entering RC6 v4

On VLV, the Punit doesn't automatically drop the GPU to it's minimum
voltage level when entering RC6, so we arm a timer to do it for us from
the RPS interrupt handler.  It'll generally only fire when we go idle
(or if for some reason there's a long delay between RPS interrupts), but
won't be re-armed again until the next RPS event, so shouldn't affect
power consumption after we go idle and it triggers.

v2: use delayed work instead of timer + work queue combo (Ville)
v3: fix up delayed work cancel (must be outside lock) (Daniel)
    fix up delayed work handling func for delayed work (Jesse)
v4: cancel delayed work before RPS shutdown (Jani)
    pass delay not absolute time to mod_delayed_work (Jani)

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/intel_pm.c