]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: vlv: add runtime PM support
authorImre Deak <imre.deak@intel.com>
Mon, 5 May 2014 12:19:56 +0000 (15:19 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 7 May 2014 08:01:39 +0000 (10:01 +0200)
commit5e1c7d2c047f1a9dbba3912f14b577f0a11c2f46
tree58d449fcc47ef98912a133c06a99393b29a812f9
parent5c18b5e2fe2b678e733f7707943ed3836dfdd97a
drm/i915: vlv: add runtime PM support

Add runtime PM support for VLV, but leave it disabled. The next patch
enables it.

The suspend/resume sequence used is based on [1] and [2]. In practice we
depend on the GT RC6 mechanism to save the HW context depending on the
render and media power wells. By the time we run the runtime suspend
callback the display side is also off and the HW context for that is
managed by the display power domain framework.

Besides the above there are Gunit registers that depend on a system-wide
power well. This power well goes off once the device enters any of the
S0i[R123] states. To handle this scenario, save/restore these Gunit
registers. Note that this is not the complete register set dictated by
[2], to remove some overhead, registers that are known not to be used are
ignored. Also some registers are fully setup by initialization functions
called during resume, these are not saved either. The list of registers
can be further reduced, see the TODO note in the code.

[1] VLV_gfx_clocking_PM_reset_y12w21d3 / "Driver D3 entry/exit"
[2] VLV2_S0IXRegs

v2:
- unchanged
v3:
- fix s/GEN6_PMIIR/GEN6_PMIMR/ typo when saving/restoring registers
  (Ville)
v4:
- rebased on the previous patch fixing GEN register prefixes

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
[ rebased (according to v4) ]
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h