Re: [igt-dev] [PATCH i-g-t 1/3] lib/dummyload: Add pollable spin batch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2018-03-22 11:17:10)
> From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> 
> 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@xxxxxxxxx>

Reviewed-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux