summaryrefslogtreecommitdiff
path: root/tests/gem_cpu_reloc.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_cpu_reloc.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_cpu_reloc.c')
-rw-r--r--tests/gem_cpu_reloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/gem_cpu_reloc.c b/tests/gem_cpu_reloc.c
index 520030a4..4e4458d2 100644
--- a/tests/gem_cpu_reloc.c
+++ b/tests/gem_cpu_reloc.c
@@ -90,10 +90,10 @@ static void copy(int fd, uint32_t batch, uint32_t src, uint32_t dst)
gem_exec[1].handle = dst;
gem_exec[2].handle = batch;
gem_exec[2].relocation_count = 2;
- gem_exec[2].relocs_ptr = (uintptr_t)gem_reloc;
+ gem_exec[2].relocs_ptr = to_user_pointer(gem_reloc);
memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = (uintptr_t)gem_exec;
+ execbuf.buffers_ptr = to_user_pointer(gem_exec);
execbuf.buffer_count = 3;
execbuf.batch_len = 4096;
execbuf.flags = use_blt;
@@ -110,7 +110,7 @@ static void exec(int fd, uint32_t handle)
gem_exec.handle = handle;
memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = (uintptr_t)&gem_exec;
+ execbuf.buffers_ptr = to_user_pointer(&gem_exec);
execbuf.buffer_count = 1;
execbuf.batch_len = 4096;