Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A2686E043 for ; Tue, 10 Aug 2021 10:53:49 +0000 (UTC) From: =?UTF-8?q?Zbigniew=20Kempczy=C5=84ski?= Date: Tue, 10 Aug 2021 12:52:39 +0200 Message-Id: <20210810105323.31375-11-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 10/54] tests/gem_create: 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_create.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/i915/gem_create.c b/tests/i915/gem_create.c index 1acf8ee6a..45804cde0 100644 --- a/tests/i915/gem_create.c +++ b/tests/i915/gem_create.c @@ -249,12 +249,16 @@ static void busy_create(int i915, int timeout) const intel_ctx_t *ctx; igt_spin_t *spin[I915_EXEC_RING_MASK + 1]; unsigned long count = 0; + uint64_t ahnd; ctx = intel_ctx_create_all_physical(i915); + ahnd = get_reloc_ahnd(i915, ctx->id); igt_fork_hang_detector(i915); for_each_ctx_engine(i915, ctx, e) - spin[e->flags] = igt_spin_new(i915, .ctx = ctx, + spin[e->flags] = igt_spin_new(i915, + .ahnd = ahnd, + .ctx = ctx, .engine = e->flags); igt_until_timeout(timeout) { @@ -263,7 +267,9 @@ static void busy_create(int i915, int timeout) igt_spin_t *next; handle = gem_create(i915, 4096); - next = igt_spin_new(i915, .ctx = ctx, + next = igt_spin_new(i915, + .ahnd = ahnd, + .ctx = ctx, .engine = e->flags, .dependency = handle, .flags = IGT_SPIN_SOFTDEP); @@ -277,6 +283,7 @@ static void busy_create(int i915, int timeout) } intel_ctx_destroy(i915, ctx); + put_ahnd(ahnd); igt_info("Created %ld objects while busy\n", count); -- 2.26.0