[Intel-gfx] [PATCH] drm/i915/selftests: Assert that the idle_pulse is sent

Mika Kuoppala mika.kuoppala at linux.intel.com
Thu Oct 31 13:34:08 UTC 2019


Chris Wilson <chris at chris-wilson.co.uk> writes:

> 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);
> +

Yes the wakeref_serial seems to be our local copy.

Reviewed-by: Mika Kuoppala <mika.kuoppala at linux.intel.com>

The extra space on starting the subtests, at the end of
the file, caught my eye.

>  	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 at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


More information about the Intel-gfx mailing list