summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/selftests/i915_gem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-07-03 10:17:12 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2019-07-03 11:07:57 +0100
commit63251685c141ef8db611cd36609a8369d97b47da (patch)
treeb7c5992223347b412afc44ad727444b5a57e2af8 /drivers/gpu/drm/i915/selftests/i915_gem.c
parent8e9ecb3e1e3366559cd4ed5ab698c391f8236a37 (diff)
downloadlinux-stable-63251685c141ef8db611cd36609a8369d97b47da.tar.gz
linux-stable-63251685c141ef8db611cd36609a8369d97b47da.tar.bz2
linux-stable-63251685c141ef8db611cd36609a8369d97b47da.zip
drm/i915/selftests: Common live setup/teardown
We frequently, but not frequently enough!, remember to flush residual operations and objects at the end of a live subtest. The purpose is to cleanup after every subtest, leaving a clean slate for the next subtest, and perform early detection of leaky state. As this should ideally be common for all live subtests, pull the task into a common teardown routine. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190703091726.11690-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/selftests/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/selftests/i915_gem.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem.c b/drivers/gpu/drm/i915/selftests/i915_gem.c
index ed0c17bf6613..b8ffae481730 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem.c
@@ -154,8 +154,6 @@ static int igt_gem_suspend(void *arg)
mutex_lock(&i915->drm.struct_mutex);
err = switch_to_context(i915, ctx);
- if (igt_flush_test(i915, I915_WAIT_LOCKED))
- err = -EIO;
mutex_unlock(&i915->drm.struct_mutex);
out:
mock_file_free(i915, file);
@@ -195,8 +193,6 @@ static int igt_gem_hibernate(void *arg)
mutex_lock(&i915->drm.struct_mutex);
err = switch_to_context(i915, ctx);
- if (igt_flush_test(i915, I915_WAIT_LOCKED))
- err = -EIO;
mutex_unlock(&i915->drm.struct_mutex);
out:
mock_file_free(i915, file);
@@ -213,5 +209,5 @@ int i915_gem_live_selftests(struct drm_i915_private *i915)
if (i915_terminally_wedged(i915))
return 0;
- return i915_subtests(tests, i915);
+ return i915_live_subtests(tests, i915);
}