From 1244fc6b9bc56cdf1584e919230796082b93f371 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 16 Sep 2014 08:17:00 +0100 Subject: [PATCH] igt/pm_rps: Fix STORE_DWORD for pre-gen8 gen8 actually changed the command layout, not just extended the relocation value. Oh well. References: https://bugs.freedesktop.org/show_bug.cgi?id=83915 Signed-off-by: Chris Wilson --- tests/pm_rps.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/pm_rps.c b/tests/pm_rps.c index d0d7d8ec..101f65d8 100644 --- a/tests/pm_rps.c +++ b/tests/pm_rps.c @@ -178,18 +178,17 @@ static void emit_store_dword_imm(uint32_t val) if (!lh.has_ppgtt) cmd |= MI_MEM_VIRTUAL; - BEGIN_BATCH(3, 1); + BEGIN_BATCH(4, 0); /* just ignore the reloc we emit and count dwords */ OUT_BATCH(cmd); if (batch->gen >= 8) { OUT_RELOC(lh.target_buffer, I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, 0); - OUT_BATCH(val); } else { OUT_BATCH(0); /* reserved */ OUT_RELOC(lh.target_buffer, I915_GEM_DOMAIN_INSTRUCTION, I915_GEM_DOMAIN_INSTRUCTION, 0); - OUT_BATCH(val); } + OUT_BATCH(val); ADVANCE_BATCH(); }