summaryrefslogtreecommitdiff
path: root/tests/gem_exec_flush.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/gem_exec_flush.c')
-rw-r--r--tests/gem_exec_flush.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c
index c7b2c48c..57e88109 100644
--- a/tests/gem_exec_flush.c
+++ b/tests/gem_exec_flush.c
@@ -160,7 +160,7 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
}
memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = (uintptr_t)obj;
+ execbuf.buffers_ptr = to_user_pointer(obj);
execbuf.buffer_count = 3;
execbuf.flags = ring | (1 << 11) | (1<<12);
if (gen < 6)
@@ -248,8 +248,8 @@ static void run(int fd, unsigned ring, int nchild, int timeout,
/* Inspect a different cacheline each iteration */
i = 16 * (idx % 64) + (idx / 64);
- obj[1].relocs_ptr = (uintptr_t)&reloc0[i];
- obj[2].relocs_ptr = (uintptr_t)&reloc1[i];
+ obj[1].relocs_ptr = to_user_pointer(&reloc0[i]);
+ obj[2].relocs_ptr = to_user_pointer(&reloc1[i]);
igt_assert_eq_u64(reloc0[i].presumed_offset, obj[0].offset);
igt_assert_eq_u64(reloc1[i].presumed_offset, obj[0].offset);
execbuf.batch_start_offset = 64*i;
@@ -392,7 +392,7 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,
map[i] = 0xabcdabcd;
memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = (uintptr_t)obj;
+ execbuf.buffers_ptr = to_user_pointer(obj);
execbuf.buffer_count = 2;
execbuf.flags = ring | (1 << 11) | (1<<12);
if (gen < 6)
@@ -403,7 +403,7 @@ static void batch(int fd, unsigned ring, int nchild, int timeout,
igt_require(__gem_execbuf(fd, &execbuf) == 0);
obj[1].relocation_count = 1;
- obj[1].relocs_ptr = (uintptr_t)&reloc;
+ obj[1].relocs_ptr = to_user_pointer(&reloc);
switch (mode) {
case BATCH_CPU: