diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-10-31 09:42:59 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-10-31 14:43:09 +0000 |
commit | 1db257c55f0c9f54a429eb603ffa30bd8b0e06e6 (patch) | |
tree | 1a592cbb59bd987c282c360e74f8e220383d9c29 /drivers/gpu/drm/i915/gt | |
parent | 29b27657dbae8d4c4bdc6bfbf6dd8c69f648e075 (diff) | |
download | linux-1db257c55f0c9f54a429eb603ffa30bd8b0e06e6.tar.bz2 |
drm/i915/selftests: Assert that the idle_pulse is sent
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>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191031094259.23028-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt')
-rw-r--r-- | drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/selftest_engine_heartbeat.c index 155c508024df..8453bf4a8b8e 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)) { @@ -337,7 +339,7 @@ int intel_heartbeat_live_selftests(struct drm_i915_private *i915) saved_hangcheck = i915_modparams.enable_hangcheck; i915_modparams.enable_hangcheck = INT_MAX; - err = intel_gt_live_subtests(tests, &i915->gt); + err = intel_gt_live_subtests(tests, &i915->gt); i915_modparams.enable_hangcheck = saved_hangcheck; return err; |