As we use chained batch into itself to hang the gpu, there
was no need to end the batchbuffer with BATCH_BUFFER_END.
With the introduction of command parser, the batch
need to have proper BATCH_BUFFER_END in it or it
will be rejected.
While at it, shift the upper half of batch gtt_offset
accordingly with gen8+
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
buf[roff] = MI_BATCH_BUFFER_START | (cmd_len - 2);
buf[roff + 1] = (gtt_off & 0xfffffffc) + (roff << 2);
if (cmd_len == 3)
- buf[roff + 2] = gtt_off & 0xffffffff00000000ull;
+ buf[roff + 2] = (gtt_off & 0xffffffff00000000ull) >> 32;
+
+ buf[roff + cmd_len] = MI_BATCH_BUFFER_END;
#ifdef VERBOSE
printf("loop injected at 0x%lx (off 0x%x, bo_start 0x%lx, bo_end 0x%lx)\n",