drm/i915/selftests: Flush the old heartbeat more gently
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 19 Oct 2020 14:28:41 +0000 (15:28 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 21 Oct 2020 18:20:24 +0000 (19:20 +0100)
commit8f2b4b684ae530cf7623cc1df22f05460b84cc5e
tree4b0214d01da7c7b8c1e033b051dd73d3b9f211b2
parentd3606757e611fbd48bb239e8c2fe9779b3f50035
drm/i915/selftests: Flush the old heartbeat more gently

In order to test how fast the heartbeat can respond, we measure with the
interval set to its minimum. Before we measure though, we want to be
sure we start with a fresh pulse, and so wait until any old one is
complete. During that wait though, we were continually flushing the
work, and so continually re-evaluating to see if the pulse was complete,
and each attempt would count as an unresponsive system. If the engine
did not complete the request in the couple of busy-spins, it would flag
an error. This is unfortunate, so let's not busy-spin waiting for the
old heartbeat, but terminate it and start afresh.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20201019142841.32273-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c