From 35fa2ca73b6b9682d0f3366b0cb4e82ac6c340ec Mon Sep 17 00:00:00 2001 From: Abdiel Janulgue Date: Tue, 11 Oct 2016 21:30:08 +0300 Subject: lib: add igt_dummyload MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Ville Syrjälä Cc: Chris Wilson Cc: tomeu@tomeuvizoso.net Reviewed-by: Tomeu Vizoso Signed-off-by: Abdiel Janulgue --- lib/drmtest.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/drmtest.c') diff --git a/lib/drmtest.c b/lib/drmtest.c index 44abc7eb..be1dc937 100644 --- a/lib/drmtest.c +++ b/lib/drmtest.c @@ -57,6 +57,7 @@ #include "config.h" #include "intel_reg.h" #include "ioctl_wrappers.h" +#include "igt_dummyload.h" /** * SECTION:drmtest @@ -159,6 +160,8 @@ void gem_quiescent_gpu(int fd) struct drm_i915_gem_exec_object2 obj; unsigned ring; + igt_terminate_spin_batches(); + memset(&obj, 0, sizeof(obj)); obj.handle = gem_create(fd, 4096); gem_write(fd, obj.handle, 0, &bbe, sizeof(&bbe)); -- cgit v1.2.3