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_exec_flush.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_exec_flush.c')
-rw-r--r-- | tests/gem_exec_flush.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/gem_exec_flush.c b/tests/gem_exec_flush.c index c7b2c48c..57e88109 100644 --- a/tests/gem_exec_flush.c +++ b/tests/gem_exec_flush.c @@ -160,7 +160,7 @@ static void run(int fd, unsigned ring, int nchild, int timeout, } memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)obj; + execbuf.buffers_ptr = to_user_pointer(obj); execbuf.buffer_count = 3; execbuf.flags = ring | (1 << 11) | (1<<12); if (gen < 6) @@ -248,8 +248,8 @@ static void run(int fd, unsigned ring, int nchild, int timeout, /* Inspect a different cacheline each iteration */ i = 16 * (idx % 64) + (idx / 64); - obj[1].relocs_ptr = (uintptr_t)&reloc0[i]; - obj[2].relocs_ptr = (uintptr_t)&reloc1[i]; + obj[1].relocs_ptr = to_user_pointer(&reloc0[i]); + obj[2].relocs_ptr = to_user_pointer(&reloc1[i]); igt_assert_eq_u64(reloc0[i].presumed_offset, obj[0].offset); igt_assert_eq_u64(reloc1[i].presumed_offset, obj[0].offset); execbuf.batch_start_offset = 64*i; @@ -392,7 +392,7 @@ static void batch(int fd, unsigned ring, int nchild, int timeout, map[i] = 0xabcdabcd; memset(&execbuf, 0, sizeof(execbuf)); - execbuf.buffers_ptr = (uintptr_t)obj; + execbuf.buffers_ptr = to_user_pointer(obj); execbuf.buffer_count = 2; execbuf.flags = ring | (1 << 11) | (1<<12); if (gen < 6) @@ -403,7 +403,7 @@ static void batch(int fd, unsigned ring, int nchild, int timeout, igt_require(__gem_execbuf(fd, &execbuf) == 0); obj[1].relocation_count = 1; - obj[1].relocs_ptr = (uintptr_t)&reloc; + obj[1].relocs_ptr = to_user_pointer(&reloc); switch (mode) { case BATCH_CPU: |