summaryrefslogtreecommitdiff
path: root/tests/gem_exec_schedule.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_schedule.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_schedule.c')
-rw-r--r--tests/gem_exec_schedule.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c
index 09f5798c..d8454d58 100644
--- a/tests/gem_exec_schedule.c
+++ b/tests/gem_exec_schedule.c
@@ -64,7 +64,7 @@ static void store_dword(int fd, uint32_t ctx, unsigned ring,
int i;
memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = (uintptr_t)(obj + !cork);
+ execbuf.buffers_ptr = to_user_pointer(obj + !cork);
execbuf.buffer_count = 2 + !!cork;
execbuf.flags = ring;
if (gen < 6)
@@ -83,7 +83,7 @@ static void store_dword(int fd, uint32_t ctx, unsigned ring,
reloc.delta = offset;
reloc.read_domains = I915_GEM_DOMAIN_INSTRUCTION;
reloc.write_domain = write_domain;
- obj[2].relocs_ptr = (uintptr_t)&reloc;
+ obj[2].relocs_ptr = to_user_pointer(&reloc);
obj[2].relocation_count = 1;
i = 0;
@@ -116,7 +116,7 @@ static uint32_t *make_busy(int fd, uint32_t target, unsigned ring)
int i;
memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = (uintptr_t)(obj + !target);
+ execbuf.buffers_ptr = to_user_pointer(obj + !target);
execbuf.buffer_count = 1 + !!target;
memset(obj, 0, sizeof(obj));
@@ -126,7 +126,7 @@ static uint32_t *make_busy(int fd, uint32_t target, unsigned ring)
gem_set_domain(fd, obj[1].handle,
I915_GEM_DOMAIN_GTT, I915_GEM_DOMAIN_GTT);
- obj[1].relocs_ptr = (uintptr_t)reloc;
+ obj[1].relocs_ptr = to_user_pointer(reloc);
obj[1].relocation_count = 1 + !!target;
memset(reloc, 0, sizeof(reloc));