Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTPS id 979BB899A5 for ; Mon, 9 Aug 2021 13:09:02 +0000 (UTC) From: =?UTF-8?q?Zbigniew=20Kempczy=C5=84ski?= Date: Mon, 9 Aug 2021 15:04:59 +0200 Message-Id: <20210809130533.27759-32-zbigniew.kempczynski@intel.com> In-Reply-To: <20210809130533.27759-1-zbigniew.kempczynski@intel.com> References: <20210809130533.27759-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 v5 31/65] tests/gem_mmap_offset: Add allocator support 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 Cc: Ch Sai Gowtham , =?UTF-8?q?Zbigniew=20Kempczy=C5=84ski?= , Petri Latvala , Ashutosh Dixit List-ID: From: Ch Sai Gowtham When relocations are not available tests must assign addresses to objects by themselves instead of relying on the driver. We use allocator for that purpose. Signed-off-by: Ch Sai Gowtham Cc: Zbigniew Kempczyński Cc: Petri Latvala Cc: Ashutosh Dixit Reviewed-by: Zbigniew Kempczyński --- tests/i915/gem_mmap_offset.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/i915/gem_mmap_offset.c b/tests/i915/gem_mmap_offset.c index f1ba67b7c..8148f0a2d 100644 --- a/tests/i915/gem_mmap_offset.c +++ b/tests/i915/gem_mmap_offset.c @@ -248,7 +248,8 @@ static void isolation(int i915) static void pf_nonblock(int i915) { - igt_spin_t *spin = igt_spin_new(i915); + uint64_t ahnd = get_reloc_ahnd(i915, 0); + igt_spin_t *spin = igt_spin_new(i915, .ahnd = ahnd); for_each_mmap_offset_type(i915, t) { uint32_t *ptr; @@ -268,6 +269,7 @@ static void pf_nonblock(int i915) } igt_spin_free(i915, spin); + put_ahnd(ahnd); } static void *memchr_inv(const void *s, int c, size_t n) -- 2.26.0