summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-01-22 17:28:54 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-01-22 17:30:28 +0000
commite0ee36141ed1747f68580559a7cbfbeba902f05c (patch)
tree00745469a455d8bb2f785f74eb7173987adec146
parentfbb0f636bd8ac898145b52961f5f7996f01ddc08 (diff)
igt/gem_softpin: Fix MI_STORE_DATA_IMM for gen3
We need both a secure batch and to flag it to use the virtual GTT address. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--tests/gem_softpin.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/gem_softpin.c b/tests/gem_softpin.c
index b686c154..76ce9036 100644
--- a/tests/gem_softpin.c
+++ b/tests/gem_softpin.c
@@ -369,6 +369,8 @@ static void test_noreloc(int fd)
memset(&execbuf, 0, sizeof(execbuf));
execbuf.buffers_ptr = (unsigned long)object;
execbuf.buffer_count = 1;
+ if (gen < 4)
+ execbuf.flags |= I915_EXEC_SECURE;
gem_execbuf(fd, &execbuf);
gem_close(fd, object[0].handle);
@@ -391,9 +393,10 @@ static void test_noreloc(int fd)
for (i = 0; i < ARRAY_SIZE(object) - 1; i++) {
*b++ = MI_STORE_DWORD_IMM;
if (gen < 8) {
- if (gen < 4)
+ if (gen < 4) {
b[-1]--;
- else
+ b[-1] |= 1 << 22;
+ } else
*b++ = 0;
*b++ = object[i].offset;
} else {
@@ -429,7 +432,7 @@ igt_main
igt_skip_on_simulation();
igt_fixture {
- fd = drm_open_driver(DRIVER_INTEL);
+ fd = drm_open_driver_master(DRIVER_INTEL);
igt_require(has_softpin_support(fd));
}