summaryrefslogtreecommitdiff
path: root/lib/igt_dummyload.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-10-09 17:20:32 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2020-10-09 20:14:16 +0100
commit3844f333747a9ac64c7ed72ee68d837708eb1ad8 (patch)
tree8f5e8da471ef330465930699e58f399849e7bb6c /lib/igt_dummyload.h
parent48005bda72a06669a73d26a7f6a3cdef4ac22689 (diff)
lib: Launch spinners from inside userptr
Add support for dummyload to be userptr, the variation in object type may be useful in some tests and to ensure complete coverage of some dark corners. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'lib/igt_dummyload.h')
-rw-r--r--lib/igt_dummyload.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/igt_dummyload.h b/lib/igt_dummyload.h
index aac0c83a..6d3e65ce 100644
--- a/lib/igt_dummyload.h
+++ b/lib/igt_dummyload.h
@@ -33,12 +33,19 @@
#include "i915_drm.h"
typedef struct igt_spin {
- unsigned int handle;
struct igt_list_head link;
+ uint32_t handle;
+ uint32_t poll_handle;
+
+ uint32_t *batch;
+
uint32_t *condition;
uint32_t cmd_precondition;
+ uint32_t *poll;
+#define SPIN_POLL_START_IDX 0
+
struct timespec last_signal;
pthread_t timer_thread;
int timerfd;
@@ -47,9 +54,6 @@ typedef struct igt_spin {
struct drm_i915_gem_exec_object2 obj[2];
#define IGT_SPIN_BATCH 1
struct drm_i915_gem_execbuffer2 execbuf;
- uint32_t poll_handle;
- uint32_t *poll;
-#define SPIN_POLL_START_IDX 0
} igt_spin_t;
struct igt_spin_factory {
@@ -66,6 +70,7 @@ struct igt_spin_factory {
#define IGT_SPIN_FAST (1 << 3)
#define IGT_SPIN_NO_PREEMPTION (1 << 4)
#define IGT_SPIN_INVALID_CS (1 << 5)
+#define IGT_SPIN_USERPTR (1 << 6)
igt_spin_t *
__igt_spin_factory(int fd, const struct igt_spin_factory *opts);