drm/i915: Suspend GuC prior to GPU Reset during GEM suspend
authorSagar Arun Kamble <[email protected]>
Wed, 5 Apr 2017 10:21:50 +0000 (15:51 +0530)
committerChris Wilson <[email protected]>
Thu, 6 Apr 2017 10:10:01 +0000 (11:10 +0100)
i915 is currently doing a full GPU reset at the end of
i915_gem_suspend() followed by GuC suspend in i915_drm_suspend(). This
GPU reset clobbers the GuC, causing the suspend request to then fail,
leaving the GuC in an undefined state. We need to tell the GuC to
suspend before we do the direct intel_gpu_reset().

v2: Commit message update. (Chris, Daniele)

Fixes: 1c777c5d1dcd ("drm/i915/hsw: Fix GPU hang during resume from S3-devices state")
Cc: Jeff McGee <[email protected]>
Cc: Daniele Ceraolo Spurio <[email protected]>
Cc: Chris Wilson <[email protected]>
Cc: Joonas Lahtinen <[email protected]>
Cc: Imre Deak <[email protected]>
Cc: Mika Kuoppala <[email protected]>
Signed-off-by: Sagar Arun Kamble <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Daniele Ceraolo Spurio <[email protected]>
Acked-by: Chris Wilson <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_gem.c

index 0595600fb775d4fedb4524bda7432422c96b5e8b..94c61aa975d84052893e5d403888422e5e001a7b 100644 (file)
@@ -1486,8 +1486,6 @@ static int i915_drm_suspend(struct drm_device *dev)
                goto out;
        }
 
-       intel_guc_suspend(dev_priv);
-
        intel_display_suspend(dev);
 
        intel_dp_mst_suspend(dev);
index 4ca88f2539c07ad62530ed7557cb35b373e621ee..28e77d28e276c6ccad5399ca066f1a67a383b986 100644 (file)
@@ -4456,6 +4456,8 @@ int i915_gem_suspend(struct drm_i915_private *dev_priv)
        i915_gem_context_lost(dev_priv);
        mutex_unlock(&dev->struct_mutex);
 
+       intel_guc_suspend(dev_priv);
+
        cancel_delayed_work_sync(&dev_priv->gpu_error.hangcheck_work);
        cancel_delayed_work_sync(&dev_priv->gt.retire_work);