[Intel-gfx] [PATCH] drm/i915/selftests: Assert that the idle_pulse is sent
Chris Wilson
chris at chris-wilson.co.uk
Thu Oct 31 09:42:59 UTC 2019
When checking the heartbeat pulse, we expect it to have been sent by the
time we have slept. We can verify this by checking the engine serial
number to see if that matches the predicted pulse serial. It will always
be true if, and only if, the pulse was sent by itself (as designed by
the test).
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
index 9e7376b592e5..07a2fffe16a1 100644
--- a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
+++ b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c
@@ -97,6 +97,8 @@ static int __live_idle_pulse(struct intel_engine_cs *engine,
goto out;
}
+ GEM_BUG_ON(READ_ONCE(engine->serial) != engine->wakeref_serial);
+
pulse_unlock_wait(p); /* synchronize with the retirement callback */
if (!i915_active_is_idle(&p->active)) {
--
2.24.0.rc1
More information about the Intel-gfx
mailing list