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
-16
View File
@@ -55,22 +55,6 @@ static uint32_t gem_create(int fd, int size)
return create.handle;
}
static void gem_read(int fd,
uint32_t handle, uint32_t offset,
void *dst, int length)
{
struct drm_i915_gem_pread arg;
int ret;
arg.handle = handle;
arg.offset = offset;
arg.size = length;
arg.data_ptr = (uintptr_t)dst;
ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_PREAD, &arg);
assert(ret == 0);
}
static void set_domain(int fd, uint32_t handle)
{
struct drm_i915_gem_set_domain set_domain;