summaryrefslogtreecommitdiff
path: root/lib/igt_dummyload.c
AgeCommit message (Collapse)Author
2017-05-17igt/gem_spin_batch: Avoid interleave throttle within open spin batchesChris Wilson
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101079 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-04-22lib: spinning batches requires working GEM, so add the precheckChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-03-27lib/dummyload: Handle timeout in a new thread instead of signal handlerAnder Conselvan de Oliveira
Currently, the main thread needs to wakeup to run the signal handler that ends a spin batch. When testing whether a function call succesfully waits for a batch to complete, this behavior is undesired. It actually invalidates the test. Fix this by spawning a new thread to handle the timeout. v2: Get rid of mutexes. (Chris) Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-02-27lib: Add basic support for valgrind annotations.Maarten Lankhorst
SIGRTMAX appears to be used by valgrind now for its internal tracking, so avoid it in the helpers. Also add some valgrind annotations in gem_mmap, to make sure that its accesses are tracked correctly. I've also added gem_munmap, but there are a lot of places that don't use it yet in tests/. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
2017-01-27lib: Fix emission of MI_BB_START for gen3 and beforeChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-19lib/dummyload: Prefer WC mmapsChris Wilson
WC mmaps have fewer coherency issues than GTT mmaps, important for timely closure. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-01-02lib: Mass conversion to to_user_pointer()Chris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01lib/igt_dummyload: Don't clear a signal if we haven't installed the timeoutChris Wilson
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01lib/dummyload: Don't clear the same signal twiceChris Wilson
Now that the signal is disable on spin_batch_end, we don't need to do the same from the signal handler if we have a match. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01Revert "igt_dummyload: Don't clear handler for invalid signal"Chris Wilson
This reverts commit 32d38ea2f6c3e07d38bc65f8cf2df1e0c0fe1c6b.
2016-12-01lib/dummyload: Clear the right signal afterwardsChris Wilson
If the signal handler fires after we delete the busybatch, it would walk the list and find no match. Then attempt to use the list_head as its info->signo. Use the passed in sig instead. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-12-01igt_dummyload: Don't clear handler for invalid signalAbdiel Janulgue
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
2016-12-01igt_dummyload: clear signal handler on the desructor as wellAbdiel Janulgue
Fixes an issue when calling igt_spin_batch_set_timeout and then tearing down the spinner right away before it has the chance to timeout, causes the associated signal handler to linger. Make sure to remove the handler on the destructor. Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
2016-11-29lib: add igt_dummyloadAbdiel Janulgue
A lot of igt testcases need some GPU workload to make sure a race window is big enough. Unfortunately having a fixed amount of workload leads to spurious test failures or overly long runtimes on some fast/slow platforms. This library contains functionality to submit GPU workloads that should consume exactly a specific amount of time. Since v14: Since we are using multiple signals, walk list of batches to terminate a batch to avoid using a single global batch. Cycle signals between SIGRTMIN and SIGRTMAX properly. Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: tomeu@tomeuvizoso.net Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>