summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2014-09-08 12:52:31 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2014-09-08 12:56:06 +0100
commitcdf0ea825ec529fe4f9e63d503da11d0a3cdee1c (patch)
treeda7bb32243c842aa0315e05d65099c25eb2ca8dd
parentbe6bb4ce4a413df5ec385523313a4e2a3894d4c8 (diff)
igt/gem_cpu_reloc: Terminate the bad batch
gen2 will read the batch up until it reaches the end as defined by the MI_BATCH_BUFFER_END command. Play nice and make sure that it does end on a MI_BB_END. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tests/gem_cpu_reloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/gem_cpu_reloc.c b/tests/gem_cpu_reloc.c
index be7028fc..e7e0fc73 100644
--- a/tests/gem_cpu_reloc.c
+++ b/tests/gem_cpu_reloc.c
@@ -200,6 +200,7 @@ igt_simple_main
bad = gem_create(fd, 4096);
gem_write(fd, bad, 0, hang, sizeof(hang));
+ gem_write(fd, bad, 4096-sizeof(end), end, sizeof(end));
/* launch the newly created batch */
copy(fd, handles[i], noop, bad);
@@ -215,6 +216,7 @@ igt_simple_main
bad = gem_create(fd, 4096);
gem_write(fd, bad, 0, hang, sizeof(hang));
+ gem_write(fd, bad, 4096-sizeof(end), end, sizeof(end));
/* launch the newly created batch */
copy(fd, handles[count-i-1], noop, bad);
@@ -230,6 +232,7 @@ igt_simple_main
bad = gem_create(fd, 4096);
gem_write(fd, bad, 0, hang, sizeof(hang));
+ gem_write(fd, bad, 4096-sizeof(end), end, sizeof(end));
/* launch the newly created batch */
gem_set_domain(fd, handles[i],