From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3C18089E0C 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:43 +0200 Message-Id: <20210810052711.7866-38-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 37/65] tests/gem_unref_active_buffers: 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_unref_active_buffers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_unref_active_buffers.c b/tests/i915/gem_unref_active_buffers.c index 731190b39..3b8c981da 100644 --- a/tests/i915/gem_unref_active_buffers.c +++ b/tests/i915/gem_unref_active_buffers.c @@ -69,11 +69,13 @@ igt_simple_main struct itimerval itv; igt_spin_t *spin; int i915; + uint64_t ahnd; i915 = drm_open_driver(DRIVER_INTEL); igt_require_gem(i915); - spin = igt_spin_new(i915); + ahnd = get_reloc_ahnd(i915, 0); + spin = igt_spin_new(i915, .ahnd = ahnd); fcntl(i915, F_SETFL, fcntl(i915, F_GETFL) | O_NONBLOCK); sigaction(SIGALRM, &sa, &old_sa); @@ -118,4 +120,5 @@ igt_simple_main sigaction(SIGALRM, &old_sa, NULL); igt_spin_free(i915, spin); + put_ahnd(ahnd); } -- 2.26.0