diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2021-01-24 09:57:14 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2021-01-24 10:08:24 +0000 |
commit | 267fa33c0947fbbb642098098ff6e5902f9a3d94 (patch) | |
tree | 2df99ce7e7ab2ded354c3c577cab7f6375210f04 /tests/i915/sysfs_clients.c | |
parent | ceb5316d76561ae4135760d6990d4fd4b2739d91 (diff) |
i915/sysfs_clients: Repeat checks on idling monotocity
Do a few more executions to make sure idle <-> transitions are
monotonic.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/i915/sysfs_clients.c')
-rw-r--r-- | tests/i915/sysfs_clients.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/i915/sysfs_clients.c b/tests/i915/sysfs_clients.c index 6a7a6855..a9cc1d23 100644 --- a/tests/i915/sysfs_clients.c +++ b/tests/i915/sysfs_clients.c @@ -357,6 +357,24 @@ busy_one(int i915, int clients, const struct intel_execution_engine2 *e) igt_info("idle: %'"PRIu64"ns\n", idle); igt_assert(idle >= active); + /* Check monotocity of idling */ + for (int pass = 0; pass < 5; pass++) { + old = idle; + + igt_spin_reset(spin); + gem_execbuf(i915, &spin->execbuf); + igt_spin_busywait_until_started(spin); + usleep(1); /* let the system process the tasklets */ + active = read_runtime(me, e->class); + igt_info("idle->active[%d]: %'"PRIu64"ns\n", pass, active); + igt_assert(active >= old); + gem_quiescent_gpu(i915); + + idle = read_runtime(me, e->class); + igt_info("active->idle[%d]: %'"PRIu64"ns\n", pass, idle); + igt_assert(idle >= active); + } + gem_context_destroy(i915, spin->execbuf.rsvd1); /* And finally after the executing context is no more */ |