lib/drmtest: extract gem_read

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter
2012-01-10 15:37:53 +01:00
parent 319638ba6d
commit bd5cf9a07d
10 changed files with 20 additions and 105 deletions
-13
View File
@@ -72,19 +72,6 @@ static void *gem_mmap(int fd, uint32_t handle, int size, int prot)
return ptr;
}
static int gem_read(int fd,
uint32_t handle, uint32_t offset,
const void *src, int length)
{
struct drm_i915_gem_pread pread;
pread.handle = handle;
pread.offset = offset;
pread.size = length;
pread.data_ptr = (uintptr_t)src;
return drmIoctl(fd, DRM_IOCTL_I915_GEM_PREAD, &pread);
}
static double elapsed(const struct timeval *start,
const struct timeval *end,
int loop)