[Intel-gfx] [igt-dev] [PATCH i-g-t 1/3] lib/dummyload: Add pollable spin batch
Chris Wilson
chris at chris-wilson.co.uk
Thu Mar 22 11:25:58 UTC 2018
Quoting Tvrtko Ursulin (2018-03-22 11:17:10)
> From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
>
> Pollable spin batch exports a spin->running pointer which can be checked
> by dereferencing it to see if the spinner is actually executing on the
> GPU.
>
> This is useful for tests which want to make sure they do not proceed with
> their next step whilst the spinner is potentially only being processed by
> the driver and not actually executing.
>
> Pollable spinner can be created with igt_spin_batch_new_poll or
> __igt_spin_batch_new_poll, after which a loop similar to:
>
> while (!*(volatile bool *)spin->running)
> ;
Let's actually make READ_ONCE() a common thing and make this a
convenient igt_spin_busywait_until_running() (igt_spin_spin)?
> Can be used to wait until the spinner start execution.
>
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
-Chris
More information about the Intel-gfx
mailing list