summaryrefslogtreecommitdiff
path: root/tests/gem_gtt_speed.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-10 18:41:46 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-10 18:41:46 +0100
commit527cad1618b458a2ff04b1d63ea1ffe926774815 (patch)
treeb7bb0f938b516d7b4b1de591dedd6894ccb7e18a /tests/gem_gtt_speed.c
parent7a6042e87ef3dee2df06b1666fb8af6889ac35b8 (diff)
lib/drmtest: extract gem_mmap
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests/gem_gtt_speed.c')
-rw-r--r--tests/gem_gtt_speed.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/gem_gtt_speed.c b/tests/gem_gtt_speed.c
index 54ed64d1..8c66aee9 100644
--- a/tests/gem_gtt_speed.c
+++ b/tests/gem_gtt_speed.c
@@ -45,22 +45,6 @@
#define OBJECT_SIZE 16384
-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 double elapsed(const struct timeval *start,
const struct timeval *end,
int loop)