summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
authorAbdiel Janulgue <abdiel.janulgue@linux.intel.com>2016-10-11 21:30:08 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2016-11-29 11:32:44 +0000
commit35fa2ca73b6b9682d0f3366b0cb4e82ac6c340ec (patch)
treef0d01bc2e78082416226e1838f2444582cd3d9a2 /lib/drmtest.c
parentd57ae360b32c4edfb88e9a0400ec5ec3a3e6959f (diff)
lib: add igt_dummyload
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>
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c3
1 files changed, 3 insertions, 0 deletions
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));