summaryrefslogtreecommitdiff
path: root/tests/i915/gem_pipe_control_store_loop.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-01-27 08:47:12 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-01-27 10:03:37 +0000
commit78784bf79bec9f6ae9a3a12f8b4328de01985ccd (patch)
treeacba4e74900f3efcce2b8ab822593d4efe1b3087 /tests/i915/gem_pipe_control_store_loop.c
parent0b0eaa353302e364376414c74ffe84c51511a217 (diff)
i915/gem_pipe_control_store_loop: Limit runtime
Use a runtime limit, not a fixed amount of work, so that it doesn't take several hundred seconds on the slower machines. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_pipe_control_store_loop.c')
-rw-r--r--tests/i915/gem_pipe_control_store_loop.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/i915/gem_pipe_control_store_loop.c b/tests/i915/gem_pipe_control_store_loop.c
index b8a21d78..9330a47c 100644
--- a/tests/i915/gem_pipe_control_store_loop.c
+++ b/tests/i915/gem_pipe_control_store_loop.c
@@ -62,13 +62,13 @@ uint32_t devid;
/* Like the store dword test, but we create new command buffers each time */
static void
-store_pipe_control_loop(bool preuse_buffer)
+store_pipe_control_loop(bool preuse_buffer, int timeout)
{
int i, val = 0;
uint32_t *buf;
drm_intel_bo *target_bo;
- for (i = 0; i < SLOW_QUICK(0x10000, 4); i++) {
+ igt_until_timeout(timeout) {
/* we want to check tlb consistency of the pipe_control target,
* so get a new buffer every time around */
target_bo = drm_intel_bo_alloc(bufmgr, "target bo", 4096, 4096);
@@ -182,10 +182,10 @@ igt_main
}
igt_subtest("fresh-buffer")
- store_pipe_control_loop(false);
+ store_pipe_control_loop(false, 2);
igt_subtest("reused-buffer")
- store_pipe_control_loop(true);
+ store_pipe_control_loop(true, 2);
igt_fixture {
intel_batchbuffer_free(batch);