summaryrefslogtreecommitdiff
path: root/tests/gem_concurrent_all.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_concurrent_all.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_concurrent_all.c')
-rw-r--r--tests/gem_concurrent_all.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gem_concurrent_all.c b/tests/gem_concurrent_all.c
index 44543fa8..2ebd30ab 100644
--- a/tests/gem_concurrent_all.c
+++ b/tests/gem_concurrent_all.c
@@ -263,7 +263,7 @@ userptr_create_bo(const struct buffers *b)
ptr = mmap(NULL, userptr.user_size,
PROT_READ | PROT_WRITE, MAP_ANON | MAP_SHARED, -1, 0);
igt_assert(ptr != (void *)-1);
- userptr.user_ptr = (uintptr_t)ptr;
+ userptr.user_ptr = to_user_pointer(ptr);
#if 0
do_or_die(drmIoctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr));
@@ -671,9 +671,9 @@ gpu_set_bo(struct buffers *buffers, drm_intel_bo *bo, uint32_t val)
gem_exec[1].handle = gem_create(fd, 4096);
gem_exec[1].relocation_count = 1;
- gem_exec[1].relocs_ptr = (uintptr_t)reloc;
+ gem_exec[1].relocs_ptr = to_user_pointer(reloc);
- execbuf.buffers_ptr = (uintptr_t)gem_exec;
+ execbuf.buffers_ptr = to_user_pointer(gem_exec);
execbuf.buffer_count = 2;
execbuf.batch_len = (b - buf) * sizeof(buf[0]);
if (gen >= 6)
@@ -957,7 +957,7 @@ static igt_hang_t all_hang(void)
gem_write(fd, obj.handle, 0, &bbe, sizeof(&bbe));
memset(&execbuf, 0, sizeof(execbuf));
- execbuf.buffers_ptr = (uintptr_t)&obj;
+ execbuf.buffers_ptr = to_user_pointer(&obj);
execbuf.buffer_count = 1;
for_each_engine(fd, engine) {