diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2015-03-23 20:57:02 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2015-03-26 08:15:19 +0000 |
commit | 4f78f9ffa23f777604c617c48c0b850301c3086e (patch) | |
tree | 6d3686f854f793c06d5d676dbb6eb634475af721 /tests/gem_exec_blt.c | |
parent | 6259d0a36b0aa2fd6fc37bdfd9bbede34334d771 (diff) |
igt/gem_exec_blt: Do a warmup run first
Sometimes it takes a pass for the GPU to come up to full speed, so do a
"cold" pass first.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_blt.c')
-rw-r--r-- | tests/gem_exec_blt.c | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c index 21e91881..1707ae49 100644 --- a/tests/gem_exec_blt.c +++ b/tests/gem_exec_blt.c @@ -241,6 +241,7 @@ static void run(int object_size, bool dumb) execbuf.flags = ring; do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); } + gem_sync(fd, handle); for (count = 1; count <= 1<<12; count <<= 1) { struct timeval start, end; @@ -269,27 +270,23 @@ int main(int argc, char **argv) igt_skip_on_simulation(); - igt_subtest("normal") { - if (argc > 1) { - for (i = 1; i < argc; i++) { - int object_size = atoi(argv[i]); - if (object_size) - run((object_size + 3) & -4, false); - } - } else - run(OBJECT_SIZE, false); + if (argc > 1) { + for (i = 1; i < argc; i++) { + int object_size = atoi(argv[i]); + if (object_size) + run((object_size + 3) & -4, false); + } + return 0; } - igt_subtest("dumb-buf") { - if (argc > 1) { - for (i = 1; i < argc; i++) { - int object_size = atoi(argv[i]); - if (object_size) - run((object_size + 3) & -4, true); - } - } else - run(OBJECT_SIZE, true); - } + igt_subtest("cold") + run(OBJECT_SIZE, false); + + igt_subtest("normal") + run(OBJECT_SIZE, false); + + igt_subtest("dumb-buf") + run(OBJECT_SIZE, true); igt_exit(); } |