drm/i915: fix rc6 enabling around suspend/resume
authorJesse Barnes <jbarnes@virtuousgeek.org>
Wed, 5 Jan 2011 20:01:25 +0000 (12:01 -0800)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 11 Jan 2011 20:43:59 +0000 (20:43 +0000)
Enabling RC6 implies setting a graphics context.  Make sure we do that
only after the ring has been enabled, otherwise our ring commands will
hang.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_suspend.c

index 2913496e87165de30551d272414029fa8ceda85e..02fce7fbcd8a2d06158efe7a3281e2ce87b44f7f 100644 (file)
@@ -357,6 +357,9 @@ static int i915_drm_thaw(struct drm_device *dev)
                drm_helper_resume_force_mode(dev);
        }
 
+       /* Clock gating state */
+       intel_enable_clock_gating(dev);
+
        intel_opregion_init(dev);
 
        dev_priv->modeset_on_lid = 0;
index af530637777af7f0349dbeaacc6bc6d70b2032fc..147cd966670003136535a4072a36c0ebad89c646 100644 (file)
@@ -868,9 +868,6 @@ 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);