From cdf0ea825ec529fe4f9e63d503da11d0a3cdee1c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 8 Sep 2014 12:52:31 +0100 Subject: [PATCH] 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 --- tests/gem_cpu_reloc.c | 3 +++ 1 file changed, 3 insertions(+) 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],