summaryrefslogtreecommitdiff
path: root/tests/gem_softpin.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-01-21 09:19:02 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-01-21 17:48:01 +0000
commita4493a54f348e547027eff3cb1607805f39f955d (patch)
tree15f7de2f9866d5c342ae6fe6cc9f845abbfee02f /tests/gem_softpin.c
parent19642c604bb0c987e6e0069974042a98d128b9fc (diff)
igt/gem_softpin: Fix MI_STORE_DWORD_IMM for gen2-3
Before gen4, MI_STORE_DWORD was just 3 dwords long (cmd, offset, value). Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_softpin.c')
-rw-r--r--tests/gem_softpin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
index f1885591..b686c154 100644
--- a/tests/gem_softpin.c
+++ b/tests/gem_softpin.c
@@ -391,7 +391,10 @@ static void test_noreloc(int fd)
for (i = 0; i < ARRAY_SIZE(object) - 1; i++) {
*b++ = MI_STORE_DWORD_IMM;
if (gen < 8) {
- *b++ = 0;
+ if (gen < 4)
+ b[-1]--;
+ else
+ *b++ = 0;
*b++ = object[i].offset;
} else {
*b++ = object[i].offset;