summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_suspend.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2011-01-05 12:01:26 -0800
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-11 20:43:59 +0000
commitd5bb081b027b520f9e59b4fb8faea83a136ec15e (patch)
tree5ff85d01f3763d0e4be1ae7934ef673db2b9c604 /drivers/gpu/drm/i915/i915_suspend.c
parent1daed3fb8324d517a1f9da43f1a1d3619d1b0ddc (diff)
downloadblackbird-op-linux-d5bb081b027b520f9e59b4fb8faea83a136ec15e.tar.gz
blackbird-op-linux-d5bb081b027b520f9e59b4fb8faea83a136ec15e.zip
drm/i915: cleanup rc6 code
Cleanup several aspects of the rc6 code: - misnamed intel_disable_clock_gating function (was only about rc6) - remove commented call to intel_disable_clock_gating - rc6 enabling code belongs in its own function (allows us to move the actual clock gating enable call back into restore_state) - allocate power & render contexts up front, only free on unload (avoids ugly lazy init at rc6 enable time) Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> [ickle: checkpatch cleanup] Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_suspend.c')
-rw-r--r--drivers/gpu/drm/i915/i915_suspend.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index 147cd9666700..0521ecf26017 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -822,10 +822,6 @@ int i915_save_state(struct drm_device *dev)
if (IS_GEN6(dev))
gen6_disable_rps(dev);
- /* XXX disabling the clock gating breaks suspend on gm45
- intel_disable_clock_gating(dev);
- */
-
/* Cache mode state */
dev_priv->saveCACHE_MODE_0 = I915_READ(CACHE_MODE_0);
@@ -868,6 +864,9 @@ int i915_restore_state(struct drm_device *dev)
I915_WRITE (IMR, dev_priv->saveIMR);
}
+ /* Clock gating state */
+ intel_enable_clock_gating(dev);
+
if (IS_IRONLAKE_M(dev)) {
ironlake_enable_drps(dev);
intel_init_emon(dev);
OpenPOWER on IntegriCloud