From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8C43089F77 for ; Mon, 14 Jun 2021 16:38:14 +0000 (UTC) Received: by mail-pg1-x531.google.com with SMTP id e20so9130918pgg.0 for ; Mon, 14 Jun 2021 09:38:14 -0700 (PDT) From: Jason Ekstrand Date: Mon, 14 Jun 2021 11:36:59 -0500 Message-Id: <20210614163704.365989-45-jason@jlekstrand.net> In-Reply-To: <20210614163704.365989-1-jason@jlekstrand.net> References: <20210614163704.365989-1-jason@jlekstrand.net> MIME-Version: 1.0 Subject: [igt-dev] [PATCH i-g-t 44/77] tests/i915/pm_rc6_residency: Convert to intel_ctx_t List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: igt-dev-bounces@lists.freedesktop.org Sender: "igt-dev" To: igt-dev@lists.freedesktop.org List-ID: Signed-off-by: Jason Ekstrand --- tests/i915/i915_pm_rc6_residency.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/i915/i915_pm_rc6_residency.c b/tests/i915/i915_pm_rc6_residency.c index bfbe4ab01..d1cce474e 100644 --- a/tests/i915/i915_pm_rc6_residency.c +++ b/tests/i915/i915_pm_rc6_residency.c @@ -455,6 +455,7 @@ static void rc6_fence(int i915) const int tolerance = 20; /* Some RC6 is better than none! */ const unsigned int gen = intel_gen(intel_get_drm_devid(i915)); const struct intel_execution_engine2 *e; + const intel_ctx_t *ctx; struct power_sample sample[2]; unsigned long slept; uint64_t rc6, ts[2]; @@ -484,14 +485,15 @@ static void rc6_fence(int i915) assert_within_epsilon(rc6, ts[1] - ts[0], 5); /* Submit but delay execution, we should be idle and conserving power */ - __for_each_physical_engine(i915, e) { + ctx = intel_ctx_create_all_physical(i915); + for_each_ctx_engine(i915, ctx, e) { igt_spin_t *spin; int timeline; int fence; timeline = sw_sync_timeline_create(); fence = sw_sync_timeline_create_fence(timeline, 1); - spin = igt_spin_new(i915, + spin = igt_spin_new(i915, .ctx = ctx, .engine = e->flags, .fence = fence, .flags = IGT_SPIN_FENCE_IN); @@ -519,6 +521,7 @@ static void rc6_fence(int i915) assert_within_epsilon(rc6, ts[1] - ts[0], tolerance); gem_quiescent_gpu(i915); } + intel_ctx_destroy(i915, ctx); rapl_close(&rapl); close(fd); -- 2.31.1 _______________________________________________ igt-dev mailing list igt-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/igt-dev