Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id AE4206E029 for ; Tue, 10 Aug 2021 10:53:51 +0000 (UTC) From: =?UTF-8?q?Zbigniew=20Kempczy=C5=84ski?= Date: Tue, 10 Aug 2021 12:52:42 +0200 Message-Id: <20210810105323.31375-14-zbigniew.kempczynski@intel.com> In-Reply-To: <20210810105323.31375-1-zbigniew.kempczynski@intel.com> References: <20210810105323.31375-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 v7 13/54] tests/gem_ctx_freq: 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/gem_ctx_freq.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_ctx_freq.c b/tests/i915/gem_ctx_freq.c index a34472de5..a29fe68b7 100644 --- a/tests/i915/gem_ctx_freq.c +++ b/tests/i915/gem_ctx_freq.c @@ -124,6 +124,7 @@ static void sysfs_range(int i915) igt_spin_t *spin; double measured; int pmu; + uint64_t ahnd = get_reloc_ahnd(i915, 0); /* * The sysfs interface sets the global limits and overrides the @@ -145,7 +146,7 @@ static void sysfs_range(int i915) uint32_t cur, discard; gem_quiescent_gpu(i915); - spin = igt_spin_new(i915); + spin = igt_spin_new(i915, .ahnd = ahnd); usleep(10000); set_sysfs_freq(sys_freq, sys_freq); @@ -164,6 +165,7 @@ static void sysfs_range(int i915) gem_quiescent_gpu(i915); close(pmu); + put_ahnd(ahnd); #undef N_STEPS } -- 2.26.0