[Intel-gfx] [PATCH] drm/i915/selftests: Move test flush to outside vm->mutex
Tvrtko Ursulin
tvrtko.ursulin at linux.intel.com
Fri Jun 12 14:44:51 UTC 2020
From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
As per our locking rules it is not allowed to wait on requests while
holding locks. In this case we were trying to idle the GPU while holding
the vm->mutex.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
---
drivers/gpu/drm/i915/selftests/i915_gem_evict.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
index 028baae9631f..67f4497c8224 100644
--- a/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/selftests/i915_gem_evict.c
@@ -498,8 +498,6 @@ static int igt_evict_contexts(void *arg)
mutex_lock(&ggtt->vm.mutex);
out_locked:
- if (igt_flush_test(i915))
- err = -EIO;
while (reserved) {
struct reserved *next = reserved->next;
@@ -513,6 +511,9 @@ static int igt_evict_contexts(void *arg)
mutex_unlock(&ggtt->vm.mutex);
intel_runtime_pm_put(&i915->runtime_pm, wakeref);
+ if (igt_flush_test(i915))
+ err = -EIO;
+
return err;
}
--
2.20.1
More information about the Intel-gfx
mailing list