drm/i915: gmch: factor out intel_set_memory_cxsr
authorImre Deak <imre.deak@intel.com>
Tue, 1 Jul 2014 09:36:17 +0000 (12:36 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 7 Jul 2014 09:33:36 +0000 (11:33 +0200)
commit5209b1f4c4f8036f52f5ac2df2afc806254f247f
tree6935ff6a0c599d8b145ab99cae02b3db1b0ad97e
parentd2011dc8d41b20dc0ec0bf741c61fe500dc8d0bc
drm/i915: gmch: factor out intel_set_memory_cxsr

This functionality will be also needed by an upcoming patch, so factor
it out. As a bonus this also makes things a bit more uniform across
platforms. Note that this also changes the register read-modify-write
to a simple write during disabling. This is what we do during enabling
anyway and according to the spec all the relevant bits are reserved-MBZ
or reserved with a 0 default value.

v2:
- unchanged
v3:
- fix missing cxsr disabling on pineview (Deepak)

Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_pm.c