summaryrefslogtreecommitdiff
path: root/tests/i915/gem_userptr_blits.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-10-23 22:33:34 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-10-23 22:35:38 +0100
commite3503f6542fef432413e78e38436e13cca76bf8c (patch)
tree471f8e6c69d0ad4b49e42a53f5f059116a66f359 /tests/i915/gem_userptr_blits.c
parent2f70a3c41c4496860c7482c1f0a591096f143c6f (diff)
i915/gem_userptr_blits: Replace fixed loop with timeout
Run 'unmap-cycles' for a bounded period of time, rather than trying to run for a 1000 cycles. This ensures that even on the slowest of machines under the heaviest of debugs it does not take an inordinate amount of time. Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2424 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_userptr_blits.c')
-rw-r--r--tests/i915/gem_userptr_blits.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tests/i915/gem_userptr_blits.c b/tests/i915/gem_userptr_blits.c
index b752a0f5..dbc82fb0 100644
--- a/tests/i915/gem_userptr_blits.c
+++ b/tests/i915/gem_userptr_blits.c
@@ -1780,9 +1780,7 @@ static void test_unmap_after_close(int fd)
static void test_unmap_cycles(int fd, int expected)
{
- int i;
-
- for (i = 0; i < 1000; i++)
+ igt_until_timeout(5)
test_unmap(fd, expected);
}