tests/gem_madvise: set execbuf.batch_len before doing an execbuf

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>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Brad Volkin 2014-11-03 11:19:00 -08:00 committed by Daniel Vetter
parent c1fdc2f0e9
commit bf31ed80e0

View File

@ -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);