diff options
author | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-10-08 19:41:49 -0700 |
---|---|---|
committer | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-10-08 20:33:41 -0700 |
commit | 41ae28e498afed2685feaa95ab8bf4ffdd687b62 (patch) | |
tree | df2e0030e77b1153682490d041f57d536fc53e6f /tests/gem_pwrite_pread.c | |
parent | 96f665cabb3038905a8a9839dae025f5156ae80e (diff) |
pwrite_pread: use execbuf.batch_len for size
This will make an upcoming change easier.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Diffstat (limited to 'tests/gem_pwrite_pread.c')
-rw-r--r-- | tests/gem_pwrite_pread.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/gem_pwrite_pread.c b/tests/gem_pwrite_pread.c index 42c3391a..6cb3d6b3 100644 --- a/tests/gem_pwrite_pread.c +++ b/tests/gem_pwrite_pread.c @@ -80,7 +80,7 @@ static void copy(int fd, uint32_t src, uint32_t dst, void *buf, int len, int loo 0, 0, 0, 0, HAS_BLT_RING(intel_get_drm_devid(fd)) ? I915_EXEC_BLT : 0, }; - gem_write(fd, exec[2].handle, 0, batch, sizeof(batch)); + gem_write(fd, exec[2].handle, 0, batch, execbuf.batch_len); while (loops--) { gem_write(fd, src, 0, buf, len); @@ -122,7 +122,7 @@ static void as_gtt_mmap(int fd, uint32_t src, uint32_t dst, void *buf, int len, }; uint32_t *src_ptr, *dst_ptr; - gem_write(fd, exec[2].handle, 0, batch, sizeof(batch)); + gem_write(fd, exec[2].handle, 0, batch, execbuf.batch_len); src_ptr = gem_mmap__gtt(fd, src, OBJECT_SIZE, PROT_WRITE); dst_ptr = gem_mmap__gtt(fd, dst, OBJECT_SIZE, PROT_READ); @@ -175,7 +175,7 @@ static void as_cpu_mmap(int fd, uint32_t src, uint32_t dst, void *buf, int len, }; uint32_t *src_ptr, *dst_ptr; - gem_write(fd, exec[2].handle, 0, batch, sizeof(batch)); + gem_write(fd, exec[2].handle, 0, batch, execbuf.batch_len); src_ptr = gem_mmap__cpu(fd, src, OBJECT_SIZE, PROT_WRITE); dst_ptr = gem_mmap__cpu(fd, dst, OBJECT_SIZE, PROT_READ); @@ -227,7 +227,7 @@ static void test_copy(int fd, uint32_t src, uint32_t dst, uint32_t *buf, int len }; int i; - gem_write(fd, exec[2].handle, 0, batch, sizeof(batch)); + gem_write(fd, exec[2].handle, 0, batch, execbuf.batch_len); for (i = 0; i < len/4; i++) buf[i] = i; @@ -276,7 +276,7 @@ static void test_as_gtt_mmap(int fd, uint32_t src, uint32_t dst, int len) uint32_t *src_ptr, *dst_ptr; int i; - gem_write(fd, exec[2].handle, 0, batch, sizeof(batch)); + gem_write(fd, exec[2].handle, 0, batch, execbuf.batch_len); src_ptr = gem_mmap__gtt(fd, src, OBJECT_SIZE, PROT_WRITE); dst_ptr = gem_mmap__gtt(fd, dst, OBJECT_SIZE, PROT_READ); @@ -328,7 +328,7 @@ static void test_as_cpu_mmap(int fd, uint32_t src, uint32_t dst, int len) uint32_t *src_ptr, *dst_ptr; int i; - gem_write(fd, exec[2].handle, 0, batch, sizeof(batch)); + gem_write(fd, exec[2].handle, 0, batch, execbuf.batch_len); src_ptr = gem_mmap__cpu(fd, src, OBJECT_SIZE, PROT_WRITE); dst_ptr = gem_mmap__cpu(fd, dst, OBJECT_SIZE, PROT_READ); |