diff mbox

[2/2] tests/gem_madvise: set execbuf.batch_len before doing an execbuf

Message ID 1415042340-26404-2-git-send-email-bradley.d.volkin@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

bradley.d.volkin@intel.com Nov. 3, 2014, 7:19 p.m. UTC
From: Brad Volkin <bradley.d.volkin@intel.com>

The command parser's batch_len optimization causes the parser to
reject this batch as not having an MI_BATCH_BUFFER_END because
the length was not set correctly.

Signed-off-by: Brad Volkin <bradley.d.volkin@intel.com>
---
 tests/gem_madvise.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/tests/gem_madvise.c b/tests/gem_madvise.c
index 04a82aa..f95fbda 100644
--- a/tests/gem_madvise.c
+++ b/tests/gem_madvise.c
@@ -131,6 +131,7 @@  dontneed_before_exec(void)
 
 	execbuf.buffers_ptr = (uintptr_t)&exec;
 	execbuf.buffer_count = 1;
+	execbuf.batch_len = sizeof(buf);
 	gem_execbuf(fd, &execbuf);
 
 	gem_close(fd, exec.handle);