Commit 91e32157 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Timeout lowlevel_hole GTT selftest early

Check for a timeout in the lowlevel_hole GTT before we allocate state
for that pass, as our cleanup phase stops on the iteration before the
timeout.

References: https://bugs.freedesktop.org/show_bug.cgi?id=99947Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.william.auld@gmail.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170224193315.21072-1-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
parent ef0f411f
...@@ -237,18 +237,19 @@ static int lowlevel_hole(struct drm_i915_private *i915, ...@@ -237,18 +237,19 @@ static int lowlevel_hole(struct drm_i915_private *i915,
GEM_BUG_ON(addr + BIT_ULL(size) > vm->total); GEM_BUG_ON(addr + BIT_ULL(size) > vm->total);
if (igt_timeout(end_time,
"%s timed out before %d/%d\n",
__func__, n, count)) {
hole_end = hole_start; /* quit */
break;
}
if (vm->allocate_va_range && if (vm->allocate_va_range &&
vm->allocate_va_range(vm, addr, BIT_ULL(size))) vm->allocate_va_range(vm, addr, BIT_ULL(size)))
break; break;
vm->insert_entries(vm, obj->mm.pages, addr, vm->insert_entries(vm, obj->mm.pages, addr,
I915_CACHE_NONE, 0); I915_CACHE_NONE, 0);
if (igt_timeout(end_time,
"%s timed out after %d/%d\n",
__func__, n, count)) {
hole_end = hole_start; /* quit */
break;
}
} }
count = n; count = n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment