diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-01-10 18:41:46 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-01-10 18:41:46 +0100 |
commit | 527cad1618b458a2ff04b1d63ea1ffe926774815 (patch) | |
tree | b7bb0f938b516d7b4b1de591dedd6894ccb7e18a /tests/gem_tiled_pread_pwrite.c | |
parent | 7a6042e87ef3dee2df06b1666fb8af6889ac35b8 (diff) |
lib/drmtest: extract gem_mmap
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_tiled_pread_pwrite.c')
-rw-r--r-- | tests/gem_tiled_pread_pwrite.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/gem_tiled_pread_pwrite.c b/tests/gem_tiled_pread_pwrite.c index e2ff8865..17de6588 100644 --- a/tests/gem_tiled_pread_pwrite.c +++ b/tests/gem_tiled_pread_pwrite.c @@ -67,22 +67,6 @@ static uint32_t current_tiling_mode; #define PAGE_SIZE 4096 -static void *gem_mmap(int fd, uint32_t handle, int size, int prot) -{ - struct drm_i915_gem_mmap_gtt mmap_arg; - void *ptr; - - mmap_arg.handle = handle; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &mmap_arg)) - return NULL; - - ptr = mmap(0, size, prot, MAP_SHARED, fd, mmap_arg.offset); - if (ptr == MAP_FAILED) - ptr = NULL; - - return ptr; -} - static void gem_get_tiling(int fd, uint32_t handle, uint32_t *tiling, uint32_t *swizzle) { |