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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux