[Intel-gfx] [PATCH] drm/i915: Assert that we successfully downclock the GPU before suspend
Daniel Vetter
daniel at ffwll.ch
Tue Nov 25 14:52:34 CET 2014
On Tue, Nov 25, 2014 at 11:56:33AM +0000, Chris Wilson wrote:
> 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 at intel.com>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gem.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> index 4a1ca7abd7f9..e4fa0bc62c10 100644
> --- a/drivers/gpu/drm/i915/i915_gem.c
> +++ b/drivers/gpu/drm/i915/i915_gem.c
> @@ -4669,6 +4669,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:
> --
> 2.1.3
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
More information about the Intel-gfx
mailing list