[Intel-gfx] [PATCH v3 2/2] drm/i915: Add assert for no pending GPU requests during suspend/resume in LR mode
During resume we will reset the SW/HW tracking for each ring head/tail pointers and so are not prepared to replay any pending requests (as opposed to GPU reset time). Add an assert for this both to the suspend and the resume code. v2: - Check for ELSP port idle already during suspend and check !gt.awake during resume. (Chris) v3: - Move the !gt.awake check to i915_gem_resume(). Cc: Chris Wilson Cc: Mika Kuoppala Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/i915_gem.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 81ea88c..c344abc 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -4437,6 +4437,7 @@ int i915_gem_suspend(struct drm_device *dev) * reset the GPU back to its idle, low power state. */ WARN_ON(dev_priv->gt.awake); + WARN_ON(i915.enable_execlists && !intel_lr_engines_idle(dev_priv)); /* * Neither the BIOS, ourselves or any other kernel @@ -4473,6 +4474,8 @@ void i915_gem_resume(struct drm_device *dev) { struct drm_i915_private *dev_priv = to_i915(dev); + WARN_ON(dev_priv->gt.awake); + mutex_lock(&dev->struct_mutex); i915_gem_restore_gtt_mappings(dev); -- 2.5.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v3 2/2] drm/i915: Add assert for no pending GPU requests during suspend/resume in LR mode
On Fri, Nov 04, 2016 at 10:58:52PM +0200, Imre Deak wrote: > During resume we will reset the SW/HW tracking for each ring head/tail > pointers and so are not prepared to replay any pending requests (as > opposed to GPU reset time). Add an assert for this both to the suspend > and the resume code. > > v2: > - Check for ELSP port idle already during suspend and check !gt.awake > during resume. (Chris) > v3: > - Move the !gt.awake check to i915_gem_resume(). > > Cc: Chris Wilson > Cc: Mika Kuoppala > Signed-off-by: Imre Deak > --- > drivers/gpu/drm/i915/i915_gem.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c > index 81ea88c..c344abc 100644 > --- a/drivers/gpu/drm/i915/i915_gem.c > +++ b/drivers/gpu/drm/i915/i915_gem.c > @@ -4437,6 +4437,7 @@ int i915_gem_suspend(struct drm_device *dev) >* reset the GPU back to its idle, low power state. >*/ > WARN_ON(dev_priv->gt.awake); > + WARN_ON(i915.enable_execlists && !intel_lr_engines_idle(dev_priv)); Just WARN_ON(!intel_execlists_idle(dev_priv)); Being forward thinking intel_execlists_submission_idle(). Reviewed-by: Chris Wilson -Chris -- Chris Wilson, Intel Open Source Technology Centre ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx