Skip to content

Commit

Permalink
drm/i915: Assert that we successfully downclock the GPU before suspend
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ickle authored and danvet committed Dec 3, 2014
1 parent 4feb765 commit bdcf120
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -4581,6 +4581,11 @@ i915_gem_suspend(struct drm_device *dev)
cancel_delayed_work_sync(&dev_priv->mm.retire_work);
flush_delayed_work(&dev_priv->mm.idle_work);

/* Assert that we sucessfully flushed all the work and
* reset the GPU back to its idle, low power state.
*/
WARN_ON(dev_priv->mm.busy);

return 0;

err:
Expand Down

0 comments on commit bdcf120

Please sign in to comment.