[Intel-gfx] [PATCH i-g-t] igt/gem_exec_await: Tag the final batch in the GTT

Chris Wilson chris at chris-wilson.co.uk
Thu Jun 7 15:27:22 UTC 2018


Batches are contained in their position within the GTT by the kernel,
and if they are in an invalid poistion will be unbound and rebound
before execution. In our test setup, we therefore need to place the
batch into a valid poistion within the GTT before we fill the ring with
busyspinners.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 tests/gem_exec_await.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tests/gem_exec_await.c b/tests/gem_exec_await.c
index b0d5c9045..5cfeb8ec8 100644
--- a/tests/gem_exec_await.c
+++ b/tests/gem_exec_await.c
@@ -135,6 +135,9 @@ static void wide(int fd, int ring_size, int timeout, unsigned int flags)
 	gem_write(fd, obj[nengine*ring_size].handle, 0, &bbe, sizeof(bbe));
 
 	memset(&execbuf, 0, sizeof(execbuf));
+	execbuf.buffers_ptr = to_user_pointer(&obj[nengine*ring_size]);
+	execbuf.buffer_count = 1;
+	gem_execbuf(fd, &execbuf); /* tag the object as a batch in the GTT */
 	execbuf.buffers_ptr = to_user_pointer(obj);
 	execbuf.buffer_count = nengine*ring_size + 1;
 
-- 
2.17.1



More information about the Intel-gfx mailing list