From c17e2c0711b9b2b4ed08883a9b0d08c04d39ca1f Mon Sep 17 00:00:00 2001 From: Zbigniew Kempczyński Date: Thu, 1 Jul 2021 13:24:51 +0200 Subject: tests/i915_pm_rc6_residency: Adopt to use allocator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Petri Latvala Cc: Ashutosh Dixit Reviewed-by: Ashutosh Dixit --- tests/i915/i915_pm_rc6_residency.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tests/i915/i915_pm_rc6_residency.c') diff --git a/tests/i915/i915_pm_rc6_residency.c b/tests/i915/i915_pm_rc6_residency.c index d1cce474..96a95140 100644 --- a/tests/i915/i915_pm_rc6_residency.c +++ b/tests/i915/i915_pm_rc6_residency.c @@ -458,7 +458,7 @@ static void rc6_fence(int i915) const intel_ctx_t *ctx; struct power_sample sample[2]; unsigned long slept; - uint64_t rc6, ts[2]; + uint64_t rc6, ts[2], ahnd; struct rapl rapl; int fd; @@ -486,6 +486,7 @@ static void rc6_fence(int i915) /* Submit but delay execution, we should be idle and conserving power */ ctx = intel_ctx_create_all_physical(i915); + ahnd = get_reloc_ahnd(i915, ctx->id); for_each_ctx_engine(i915, ctx, e) { igt_spin_t *spin; int timeline; @@ -493,7 +494,9 @@ static void rc6_fence(int i915) timeline = sw_sync_timeline_create(); fence = sw_sync_timeline_create_fence(timeline, 1); - spin = igt_spin_new(i915, .ctx = ctx, + spin = igt_spin_new(i915, + .ahnd = ahnd, + .ctx = ctx, .engine = e->flags, .fence = fence, .flags = IGT_SPIN_FENCE_IN); @@ -522,6 +525,7 @@ static void rc6_fence(int i915) gem_quiescent_gpu(i915); } intel_ctx_destroy(i915, ctx); + put_ahnd(ahnd); rapl_close(&rapl); close(fd); -- cgit v1.2.3