summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-04-05 19:40:08 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2018-04-06 16:52:24 +0100
commit5e304cb3a687fc9ded946b20c5b0a7467e26d599 (patch)
tree920f51174624f9317888308ba6cbaf2005994389
parente5a785cc7b6b6ca47a40467878372728064d02fa (diff)
lib: Acquire master for pollable spinbatch on gen4/5
gen4/5 require a DRM_MASTER to use MI_STORE_DW, make it so. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
-rw-r--r--lib/igt_dummyload.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
index 98ab7ac2..ba917ba5 100644
--- a/lib/igt_dummyload.c
+++ b/lib/igt_dummyload.c
@@ -31,6 +31,7 @@
#include "igt_core.h"
#include "drmtest.h"
+#include "igt_device.h"
#include "igt_dummyload.h"
#include "igt_gt.h"
#include "intel_chipset.h"
@@ -144,8 +145,10 @@ emit_recursive_batch(igt_spin_t *spin, int fd, uint32_t ctx, unsigned engine,
igt_assert(!dep);
- if (gen == 4 || gen == 5)
+ if (gen == 4 || gen == 5) {
execbuf->flags |= I915_EXEC_SECURE;
+ igt_require(__igt_device_set_master(fd) == 0);
+ }
spin->poll_handle = gem_create(fd, 4096);