[igt-dev] [PATCH i-g-t 61/93] tests/i915/pm_rc6_residency: Convert to intel_ctx_t
Jason Ekstrand
jason at jlekstrand.net
Wed Jun 9 04:32:27 UTC 2021
Signed-off-by: Jason Ekstrand <jason at jlekstrand.net>
---
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 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);
--
2.31.1
More information about the igt-dev
mailing list