[Intel-gfx] [PATCH igt] igt/gem_sync: Sync before starting the clock
Chris Wilson
chris at chris-wilson.co.uk
Fri Sep 29 08:19:59 UTC 2017
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 at chris-wilson.co.uk>
---
tests/gem_sync.c | 3 +++
1 file changed, 3 insertions(+)
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;
--
2.14.2
More information about the Intel-gfx
mailing list