aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-11-25 06:56:33 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-12-03 03:35:12 -0500
commitbdcf120bfcb7e3b9356e96cdd7a6ac3c28062ffc (patch)
treef56eb2a43d513ba26809ebf32f6a8114d1a72fee /drivers/gpu/drm/i915/i915_gem.c
parent4feb765943c42dbc706dac348e8a893325b1153f (diff)
drm/i915: Assert that we successfully downclock the GPU before suspend
Before suspending, we wait upon the outstanding GPU requests and flush our pending idle handlers. This should downclock the GPU to its lowest power state. Add a WARN to check that the delayed tasks were run and did their job properly. Suggested-by: Akash Goel <akash.goel@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index c630d4986376..fa3f907ce229 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -4581,6 +4581,11 @@ i915_gem_suspend(struct drm_device *dev)
4581 cancel_delayed_work_sync(&dev_priv->mm.retire_work); 4581 cancel_delayed_work_sync(&dev_priv->mm.retire_work);
4582 flush_delayed_work(&dev_priv->mm.idle_work); 4582 flush_delayed_work(&dev_priv->mm.idle_work);
4583 4583
4584 /* Assert that we sucessfully flushed all the work and
4585 * reset the GPU back to its idle, low power state.
4586 */
4587 WARN_ON(dev_priv->mm.busy);
4588
4584 return 0; 4589 return 0;
4585 4590
4586err: 4591err: