diff options
Diffstat (limited to 'tests/gem_readwrite.c')
-rw-r--r-- | tests/gem_readwrite.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/tests/gem_readwrite.c b/tests/gem_readwrite.c index e8a2b7e7..68c3ff28 100644 --- a/tests/gem_readwrite.c +++ b/tests/gem_readwrite.c @@ -77,7 +77,6 @@ do_write(int fd, int handle, void *buf, int offset, int size) int main(int argc, char **argv) { int fd; - struct drm_i915_gem_create create; uint8_t expected[OBJECT_SIZE]; uint8_t buf[OBJECT_SIZE]; int ret; @@ -85,11 +84,7 @@ int main(int argc, char **argv) fd = drm_open_any(); - memset(&create, 0, sizeof(create)); - create.size = OBJECT_SIZE; - ret = ioctl(fd, DRM_IOCTL_I915_GEM_CREATE, &create); - assert(ret == 0); - handle = create.handle; + handle = gem_create(fd, OBJECT_SIZE); printf("Testing contents of newly created object.\n"); ret = do_read(fd, handle, buf, 0, OBJECT_SIZE); |