summaryrefslogtreecommitdiff
path: root/tests/gem_exec_async.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-01-02 11:05:21 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2017-01-02 11:17:13 +0000
commit4de67b26788c60c19254c3e69e151ee200453895 (patch)
tree566eda27dcfe0f8266ba1931681003b9b76d8642 /tests/gem_exec_async.c
parent0517d877b65bade23332cba0828acae7ae5fccb9 (diff)
igt: Mass conversion to to_user_pointer()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_exec_async.c')
-rw-r--r--tests/gem_exec_async.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gem_exec_async.c b/tests/gem_exec_async.c
index 735df5fc..54fb4367 100644
--- a/tests/gem_exec_async.c
+++ b/tests/gem_exec_async.c
@@ -39,7 +39,7 @@ static void store_dword(int fd, unsigned ring,
int i;
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;
if (gen < 6)
@@ -57,7 +57,7 @@ static void store_dword(int fd, unsigned ring,
reloc.delta = offset;
reloc.read_domains = I915_GEM_DOMAIN_INSTRUCTION;
reloc.write_domain = I915_GEM_DOMAIN_INSTRUCTION;
- obj[1].relocs_ptr = (uintptr_t)&reloc;
+ obj[1].relocs_ptr = to_user_pointer(&reloc);
obj[1].relocation_count = 1;
i = 0;
@@ -100,7 +100,7 @@ static void one(int fd, unsigned ring, uint32_t flags)
obj[SCRATCH].handle = gem_create(fd, 4096);
obj[BATCH].handle = gem_create(fd, 4096);
- obj[BATCH].relocs_ptr = (uintptr_t)&reloc;
+ obj[BATCH].relocs_ptr = to_user_pointer(&reloc);
obj[BATCH].relocation_count = 1;
memset(&reloc, 0, sizeof(reloc));
@@ -135,7 +135,7 @@ static void one(int fd, unsigned ring, uint32_t flags)
i++;
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 | flags;
igt_require(__gem_execbuf(fd, &execbuf) == 0);