summaryrefslogtreecommitdiff
path: root/tests/gem_sync.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-09-29 09:17:43 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-09-29 15:22:30 +0100
commit09f8cb1a3758fa9868a07b83a3d3db2973d795cc (patch)
treee7fdbd504523a205b0d70c3d80eb9ef01fdab4f4 /tests/gem_sync.c
parent182b1941d8e221f1f5625c53f74b09bef7d8837a (diff)
igt/gem_sync: Sync before starting the clock
Hide the initial setup cost of a new batch by performing it before we start the clock for measuring the execute-wait latency. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Diffstat (limited to 'tests/gem_sync.c')
-rw-r--r--tests/gem_sync.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gem_sync.c b/tests/gem_sync.c
index 8ed9760d..c9e2f014 100644
--- a/tests/gem_sync.c
+++ b/tests/gem_sync.c
@@ -138,6 +138,7 @@ sync_ring(int fd, unsigned ring, int num_children, int timeout)
execbuf.buffer_count = 1;
execbuf.flags = engines[child % num_engines];
gem_execbuf(fd, &execbuf);
+ gem_sync(fd, object.handle);
start = gettime();
cycles = 0;
@@ -553,6 +554,7 @@ sync_all(int fd, int num_children, int timeout)
execbuf.buffers_ptr = to_user_pointer(&object);
execbuf.buffer_count = 1;
gem_execbuf(fd, &execbuf);
+ gem_sync(fd, object.handle);
start = gettime();
cycles = 0;
@@ -773,6 +775,7 @@ preempt(int fd, unsigned ring, int num_children, int timeout)
execbuf.flags = engines[child % num_engines];
execbuf.rsvd1 = ctx[1];
gem_execbuf(fd, &execbuf);
+ gem_sync(fd, object.handle);
start = gettime();
cycles = 0;