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_gtt_hog.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_gtt_hog.c')
-rw-r--r-- | tests/gem_gtt_hog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/gem_gtt_hog.c b/tests/gem_gtt_hog.c index 365b43ee..2fb487d7 100644 --- a/tests/gem_gtt_hog.c +++ b/tests/gem_gtt_hog.c @@ -98,9 +98,9 @@ static void busy(data_t *data, uint32_t handle, int size, int loops) drmIoctl(data->fd, DRM_IOCTL_I915_GEM_CREATE, &create); gem_exec[1].handle = create.handle; gem_exec[1].relocation_count = 20; - 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]); execbuf.flags = 1 << 11; @@ -110,7 +110,7 @@ static void busy(data_t *data, uint32_t handle, int size, int loops) gem_pwrite.handle = gem_exec[1].handle; gem_pwrite.offset = 0; gem_pwrite.size = execbuf.batch_len; - gem_pwrite.data_ptr = (uintptr_t)buf; + gem_pwrite.data_ptr = to_user_pointer(buf); if (drmIoctl(data->fd, DRM_IOCTL_I915_GEM_PWRITE, &gem_pwrite) == 0) { while (loops--) drmIoctl(data->fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); |