Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id DDB856E055 for ; Tue, 10 Aug 2021 10:54:13 +0000 (UTC) From: =?UTF-8?q?Zbigniew=20Kempczy=C5=84ski?= Date: Tue, 10 Aug 2021 12:53:07 +0200 Message-Id: <20210810105323.31375-39-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 38/54] tests/gem_wait: 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_wait.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/i915/gem_wait.c b/tests/i915/gem_wait.c index d56707eda..0d1fea996 100644 --- a/tests/i915/gem_wait.c +++ b/tests/i915/gem_wait.c @@ -78,11 +78,13 @@ static void invalid_buf(int fd) static void basic(int fd, const intel_ctx_t *ctx, unsigned engine, unsigned flags) { + uint64_t ahnd = get_reloc_ahnd(fd, ctx->id); IGT_CORK_HANDLE(cork); uint32_t plug = flags & (WRITE | AWAIT) ? igt_cork_plug(&cork, fd) : 0; igt_spin_t *spin = igt_spin_new(fd, + .ahnd = ahnd, .ctx = ctx, .engine = engine, .dependency = plug, @@ -147,6 +149,7 @@ static void basic(int fd, const intel_ctx_t *ctx, unsigned engine, if (plug) gem_close(fd, plug); igt_spin_free(fd, spin); + put_ahnd(ahnd); } static void test_all_engines(const char *name, int i915, const intel_ctx_t *ctx, -- 2.26.0