diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-02 11:05:21 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-01-02 11:17:13 +0000 |
commit | 4de67b26788c60c19254c3e69e151ee200453895 (patch) | |
tree | 566eda27dcfe0f8266ba1931681003b9b76d8642 /tests/gem_shrink.c | |
parent | 0517d877b65bade23332cba0828acae7ae5fccb9 (diff) |
igt: Mass conversion to to_user_pointer()
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_shrink.c')
-rw-r--r-- | tests/gem_shrink.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/gem_shrink.c b/tests/gem_shrink.c index 2cc99459..bd0f17da 100644 --- a/tests/gem_shrink.c +++ b/tests/gem_shrink.c @@ -87,7 +87,7 @@ static void execbuf1(int fd, uint64_t alloc) memset(&obj, 0, sizeof(obj)); memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)&obj; + execbuf.buffers_ptr = to_user_pointer(&obj); execbuf.buffer_count = 1; obj.handle = gem_create(fd, alloc); @@ -138,7 +138,7 @@ static void execbufN(int fd, uint64_t alloc) int j = count - i; obj[j].handle = gem_create(fd, 1 << 20); - execbuf.buffers_ptr = (uintptr_t)&obj[j]; + execbuf.buffers_ptr = to_user_pointer(&obj[j]); execbuf.buffer_count = i + 1; gem_execbuf(fd, &execbuf); } @@ -166,7 +166,7 @@ static void hang(int fd, uint64_t alloc) int j = count - i; obj[j].handle = gem_create(fd, 1 << 20); - execbuf.buffers_ptr = (uintptr_t)&obj[j]; + execbuf.buffers_ptr = to_user_pointer(&obj[j]); execbuf.buffer_count = i + 1; gem_execbuf(fd, &execbuf); } @@ -191,7 +191,7 @@ static void userptr(int fd, uint64_t alloc) memset(&userptr, 0, sizeof(userptr)); userptr.user_size = alloc; - userptr.user_ptr = (uintptr_t)ptr; + userptr.user_ptr = to_user_pointer(ptr); do_ioctl(fd, LOCAL_IOCTL_I915_GEM_USERPTR, &userptr); gem_set_domain(fd, userptr.handle, I915_GEM_DOMAIN_GTT, 0); |