[Intel-gfx] [PATCH] drm/i915/selftests: Move test flush to outside vm->mutex
Chris Wilson
chris at chris-wilson.co.uk
Fri Jun 12 14:55:55 UTC 2020
Quoting Tvrtko Ursulin (2020-06-12 15:44:51)
> 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.
Synchronous eviction would like to have a word.
> 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;
The patch is ok, since the manual drm_mm_node reservations are not used
by the GTT, but the reason is a bit specious.
-Chris
More information about the Intel-gfx
mailing list