summaryrefslogtreecommitdiff
path: root/tests/gem_reset_stats.c
diff options
context:
space:
mode:
authorMika Kuoppala <mika.kuoppala@intel.com>2014-04-10 16:06:27 +0300
committerMika Kuoppala <mika.kuoppala@intel.com>2014-04-10 17:24:38 +0300
commit1c7ca57e531315f78f8ea3b9dce7bd92d7d79f64 (patch)
treee22a7e6ce779bb9d6d699344e80c4771ff33ef78 /tests/gem_reset_stats.c
parentf74c443925578b377c47d655a2d864b8ed521330 (diff)
tests/gem_reset_stats: end hanging batch properly
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>
Diffstat (limited to 'tests/gem_reset_stats.c')
-rw-r--r--tests/gem_reset_stats.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/gem_reset_stats.c b/tests/gem_reset_stats.c
index 3e7460f0..53b30a1b 100644
--- a/tests/gem_reset_stats.c
+++ b/tests/gem_reset_stats.c
@@ -326,7 +326,9 @@ static int inject_hang_ring(int fd, int ctx, int ring)
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",