diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-18 17:19:50 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-18 18:12:13 +0100 |
commit | 1422768fa2600442bfc4be4b1fe112bf9d6bb5cf (patch) | |
tree | c534881eb10bb315b1330b33afb9214b70d20c31 /drivers/gpu | |
parent | 0bd6cb6b58f7332c61cef2e4ae48db1ca9910b6b (diff) |
drm/i915/selftests: Flush live_evict
Be sure to cleanup after live_evict by flushing any residual state off
the GPU using igt_flush_test.
Tvrtko mentioned that it is probably wise to stop repeating this ad hoc
around the tests and implement a live test runner.
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/20190618161951.28820-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c index 8c69198c7e4e..a3cb0aade6f1 100644 --- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c @@ -28,6 +28,7 @@ #include "i915_selftest.h" +#include "igt_flush_test.h" #include "lib_sw_fence.h" #include "mock_drm.h" #include "mock_gem_device.h" @@ -505,6 +506,8 @@ static int igt_evict_contexts(void *arg) mutex_lock(&i915->drm.struct_mutex); out_locked: + if (igt_flush_test(i915, I915_WAIT_LOCKED)) + err = -EIO; while (reserved) { struct reserved *next = reserved->next; |