diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 17:29:20 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-06-04 17:50:51 +0100 |
commit | 77586dcdf7240aebf29d3d70313dce9d79108147 (patch) | |
tree | 4a185b10d392ff3bec898e5f8a50b79dbf53c3dd /lib/drmtest.h | |
parent | b558877f6e25663ece1242f1e658cf1630d7d7fe (diff) |
test/gem_gtt_speed: Add a baseline test for the performance of a CPU mmap
When looking at the pwrite/pread/wc performance, it is useful to judge
that against the performance of an ordinary CPU mmap.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'lib/drmtest.h')
-rw-r--r-- | lib/drmtest.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/drmtest.h b/lib/drmtest.h index 9f27e2c3..4021104b 100644 --- a/lib/drmtest.h +++ b/lib/drmtest.h @@ -52,7 +52,11 @@ void gem_set_domain(int fd, uint32_t handle, uint32_t read_domains, uint32_t write_domain); void gem_sync(int fd, uint32_t handle); uint32_t gem_create(int fd, int size); -void *gem_mmap(int fd, uint32_t handle, int size, int prot); + +void *gem_mmap__gtt(int fd, uint32_t handle, int size, int prot); +void *gem_mmap__cpu(int fd, uint32_t handle, int size, int prot); +#define gem_mmap gem_mmap__gtt + uint64_t gem_aperture_size(int fd); uint64_t gem_mappable_aperture_size(void); int gem_madvise(int fd, uint32_t handle, int state); |