diff options
author | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2021-04-26 07:33:09 +0200 |
---|---|---|
committer | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2021-08-10 21:02:50 +0200 |
commit | f51494f95271caa0863215c9e8f9d50061a82b4c (patch) | |
tree | e7e9c72813a6e0a2871e051845dc6c4aba0a7e20 /tests | |
parent | 1cccb0a65199a51c88a11ee49bd3efd94aab5868 (diff) |
tests/gem_create: Adopt to use allocator
For newer gens we're not able to rely on relocations. Adopt to use
offsets acquired from the allocator.
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/i915/gem_create.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c index 1acf8ee6..45804cde 100644 --- a/tests/i915/gem_create.c +++ b/tests/i915/gem_create.c @@ -249,12 +249,16 @@ static void busy_create(int i915, int timeout) const intel_ctx_t *ctx; igt_spin_t *spin[I915_EXEC_RING_MASK + 1]; unsigned long count = 0; + uint64_t ahnd; ctx = intel_ctx_create_all_physical(i915); + ahnd = get_reloc_ahnd(i915, ctx->id); igt_fork_hang_detector(i915); for_each_ctx_engine(i915, ctx, e) - spin[e->flags] = igt_spin_new(i915, .ctx = ctx, + spin[e->flags] = igt_spin_new(i915, + .ahnd = ahnd, + .ctx = ctx, .engine = e->flags); igt_until_timeout(timeout) { @@ -263,7 +267,9 @@ static void busy_create(int i915, int timeout) igt_spin_t *next; handle = gem_create(i915, 4096); - next = igt_spin_new(i915, .ctx = ctx, + next = igt_spin_new(i915, + .ahnd = ahnd, + .ctx = ctx, .engine = e->flags, .dependency = handle, .flags = IGT_SPIN_SOFTDEP); @@ -277,6 +283,7 @@ static void busy_create(int i915, int timeout) } intel_ctx_destroy(i915, ctx); + put_ahnd(ahnd); igt_info("Created %ld objects while busy\n", count); |