Quoting Tvrtko Ursulin (2018-03-22 11:17:10)
> From: Tvrtko Ursulin <[email protected]>
> 
> 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 <[email protected]>

Reviewed-by: Chris Wilson <[email protected]>
-Chris
_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to