Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/selftests: Assert that the idle_pulse is sent
@ 2019-10-31  9:42 Chris Wilson
  2019-10-31  9:42 ` [Intel-gfx] " Chris Wilson
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Chris Wilson @ 2019-10-31  9:42 UTC (permalink / raw)
  To: intel-gfx

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@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..c1dbacfcdb90 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(engine->wakeref_serial != engine->serial);
+
 	pulse_unlock_wait(p); /* synchronize with the retirement callback */
 
 	if (!i915_active_is_idle(&p->active)) {
-- 
2.24.0.rc1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-11-01 10:07 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-31  9:42 [PATCH] drm/i915/selftests: Assert that the idle_pulse is sent Chris Wilson
2019-10-31  9:42 ` [Intel-gfx] " Chris Wilson
2019-10-31  9:42 ` Chris Wilson
2019-10-31  9:42   ` [Intel-gfx] " Chris Wilson
2019-10-31 13:34   ` Mika Kuoppala
2019-10-31 13:34     ` [Intel-gfx] " Mika Kuoppala
2019-10-31 10:26 ` ✓ Fi.CI.BAT: success for drm/i915/selftests: Assert that the idle_pulse is sent (rev2) Patchwork
2019-10-31 10:26   ` [Intel-gfx] " Patchwork
2019-11-01 10:07 ` ✓ Fi.CI.IGT: " Patchwork
2019-11-01 10:07   ` [Intel-gfx] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox