summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorChris Wilson2018-07-17 10:41:21 +0200
committerChris Wilson2018-07-18 15:49:55 +0200
commit01f8f33e9986aed42a0366704f715cf30e7cb41c (patch)
tree962e53d75bf039e26a74dd41711dddaa4551725f /drivers/gpu/drm/i915
parentdrm/i915: Flush chipset caches after GGTT writes (diff)
downloadkernel-qcow2-linux-01f8f33e9986aed42a0366704f715cf30e7cb41c.tar.gz
kernel-qcow2-linux-01f8f33e9986aed42a0366704f715cf30e7cb41c.tar.xz
kernel-qcow2-linux-01f8f33e9986aed42a0366704f715cf30e7cb41c.zip
drm/i915: Always retire residual requests before suspend
If the driver is wedged, we skip idling the GPU. However, we may still have a few requests still not retired following the wedging (since they will be waiting for a background worker trying to acquire struct_mutex). As we hold the struct_mutex, always do a quick request retirement in order to flush the wedged path. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107257 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180717084121.28185-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 08266791801e..fcc73a6ab503 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -5074,6 +5074,8 @@ int i915_gem_suspend(struct drm_i915_private *i915)
assert_kernel_context_is_current(i915);
}
+ i915_retire_requests(i915); /* ensure we flush after wedging */
+
mutex_unlock(&i915->drm.struct_mutex);
intel_uc_suspend(i915);