From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by gabe.freedesktop.org (Postfix) with ESMTPS id C1D9F89E08 for ; Tue, 10 Aug 2021 05:28:22 +0000 (UTC) From: =?UTF-8?q?Zbigniew=20Kempczy=C5=84ski?= Date: Tue, 10 Aug 2021 07:26:50 +0200 Message-Id: <20210810052711.7866-45-zbigniew.kempczynski@intel.com> In-Reply-To: <20210810052711.7866-1-zbigniew.kempczynski@intel.com> References: <20210810052711.7866-1-zbigniew.kempczynski@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Subject: [igt-dev] [PATCH i-g-t v6 44/65] tests/i915_pm_rc6_residency: Adopt to use allocator List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: igt-dev@lists.freedesktop.org List-ID: 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(-) diff --git a/tests/i915/i915_pm_rc6_residency.c b/tests/i915/i915_pm_rc6_residency.c index d1cce474e..96a951406 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); -- 2.26.0