diff options
author | Jason Ekstrand <jason@jlekstrand.net> | 2021-04-06 17:53:59 -0500 |
---|---|---|
committer | Jason Ekstrand <jason@jlekstrand.net> | 2021-07-08 12:45:33 -0500 |
commit | bc6924d59a33bb069a4d10abe67ef221ff2b497a (patch) | |
tree | 3f30b85dd65e6f0be089dea3411338892641aa75 /tests | |
parent | 8165a98c3d35c95b16a5231030bba64d77769107 (diff) |
tests/i915/pm_rc6_residency: Convert to intel_ctx_t
Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Zbigniew KempczyĆski <zbigniew.kempczynski@intel.com>
Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/i915/i915_pm_rc6_residency.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/i915/i915_pm_rc6_residency.c b/tests/i915/i915_pm_rc6_residency.c index bfbe4ab0..d1cce474 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); |