summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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",