diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-01-28 19:59:33 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-01-28 20:01:47 +0000 |
commit | dc910aa6556732c76baf0b5349cc8208bd558674 (patch) | |
tree | a599b25a0be248c095d0081653a3889b48ecbd53 /tests/i915/gem_workarounds.c | |
parent | 405d9f32ba1f76f8af2efe91b25ed161fef762e1 (diff) |
i915/gem_workarounds: Map buffer for WRITE as we may write into it
We fix up a failed SRM by performing an mmio writing into the results
buffer, so it is not strictly a readonly buffer for such failures.
If it were not for the suspend coverage, we could simply get rid of this
duplicate testing.
Fixes: 4b9889882ef6 ("i915/gem_workarounds: Mix and match SRM with mmio reads")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'tests/i915/gem_workarounds.c')
-rw-r--r-- | tests/i915/gem_workarounds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/i915/gem_workarounds.c b/tests/i915/gem_workarounds.c index 02c1f9d5..2fce445d 100644 --- a/tests/i915/gem_workarounds.c +++ b/tests/i915/gem_workarounds.c @@ -142,7 +142,7 @@ static int workaround_fail_count(int i915, uint32_t ctx) igt_debug("Address\tval\t\tmask\t\tread\t\tresult\n"); - out = gem_mmap__cpu(i915, obj[0].handle, 0, result_sz, PROT_READ); + out = gem_mmap__cpu(i915, obj[0].handle, 0, result_sz, PROT_WRITE); for (int i = 0; i < num_wa_regs; i++) { char buf[80]; |