diff options
author | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-05-22 12:46:52 +0300 |
---|---|---|
committer | Mika Kuoppala <mika.kuoppala@linux.intel.com> | 2019-05-23 11:54:31 +0300 |
commit | c66eaafd9d971efdfe705c18da737aeea79a87c0 (patch) | |
tree | b38b36b1443c367bac6b44e417b78c0ef5a938db /tests/i915/i915_hangman.c | |
parent | 95d22d5fece7af1448e3b533228c9298080d26e7 (diff) |
lib/dummyload: Cleanup access to spin obj array
Instead of relying a static obj array inside igt_spin_t,
access it with proper indexing.
v2: IGT_SPIN_BATCH
v3: indent
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/i915/i915_hangman.c')
-rw-r--r-- | tests/i915/i915_hangman.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/i915/i915_hangman.c b/tests/i915/i915_hangman.c index bb5521e0..58141fc9 100644 --- a/tests/i915/i915_hangman.c +++ b/tests/i915/i915_hangman.c @@ -209,7 +209,7 @@ static void test_error_state_capture(unsigned ring_id, clear_error_state(); hang = igt_hang_ctx(device, 0, ring_id, HANG_ALLOW_CAPTURE); - offset = hang.spin->obj[1].offset; + offset = hang.spin->obj[IGT_SPIN_BATCH].offset; batch = gem_mmap__cpu(device, hang.spin->handle, 0, 4096, PROT_READ); gem_set_domain(device, hang.spin->handle, I915_GEM_DOMAIN_CPU, 0); |