diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-01-10 15:07:19 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-01-10 15:07:19 +0100 |
commit | 5dd17d3f4bddb075f3fb6fbcd1b6c271f7b746a7 (patch) | |
tree | b6418af8f2663efbfdc53c360f797d7642b3291a /tests | |
parent | aa67b22e426f26f8a8d7fe35221fe2a6ceb5d3db (diff) |
lib/drmtest: extract gem_close
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_bad_length.c | 10 | ||||
-rw-r--r-- | tests/gem_exec_blt.c | 8 | ||||
-rw-r--r-- | tests/gem_exec_faulting_reloc.c | 8 | ||||
-rw-r--r-- | tests/gem_exec_nop.c | 8 | ||||
-rw-r--r-- | tests/gem_gtt_speed.c | 8 | ||||
-rw-r--r-- | tests/gem_linear_blits.c | 10 | ||||
-rw-r--r-- | tests/gem_mmap_gtt.c | 10 | ||||
-rw-r--r-- | tests/gem_pwrite.c | 8 | ||||
-rw-r--r-- | tests/gem_vmap_blits.c | 10 | ||||
-rw-r--r-- | tests/gen3_mixed_blits.c | 10 | ||||
-rw-r--r-- | tests/gen3_render_linear_blits.c | 10 | ||||
-rw-r--r-- | tests/gen3_render_mixed_blits.c | 10 | ||||
-rw-r--r-- | tests/gen3_render_tiledx_blits.c | 10 | ||||
-rw-r--r-- | tests/gen3_render_tiledy_blits.c | 10 | ||||
-rw-r--r-- | tests/testdisplay.c | 8 |
15 files changed, 0 insertions, 138 deletions
diff --git a/tests/gem_bad_length.c b/tests/gem_bad_length.c index 347f1d98..167128d5 100644 --- a/tests/gem_bad_length.c +++ b/tests/gem_bad_length.c @@ -85,16 +85,6 @@ static int gem_exec(int fd, struct drm_i915_gem_execbuffer2 *execbuf) return drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf); } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static void create0(int fd) { int retval = 0; diff --git a/tests/gem_exec_blt.c b/tests/gem_exec_blt.c index b2ca2d67..c1350e96 100644 --- a/tests/gem_exec_blt.c +++ b/tests/gem_exec_blt.c @@ -150,14 +150,6 @@ static int gem_linear_blt(uint32_t *batch, return (b+2 - batch) * sizeof(uint32_t); } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - - close.handle = handle; - (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); -} - static void gem_sync(int fd, uint32_t handle) { struct drm_i915_gem_set_domain set_domain; diff --git a/tests/gem_exec_faulting_reloc.c b/tests/gem_exec_faulting_reloc.c index b1ce0504..be845107 100644 --- a/tests/gem_exec_faulting_reloc.c +++ b/tests/gem_exec_faulting_reloc.c @@ -175,14 +175,6 @@ static int gem_linear_blt(uint32_t *batch, return (b+2 - batch) * sizeof(uint32_t); } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - - close.handle = handle; - (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); -} - static void gem_sync(int fd, uint32_t handle) { struct drm_i915_gem_set_domain set_domain; diff --git a/tests/gem_exec_nop.c b/tests/gem_exec_nop.c index 82076f0c..583d1a52 100644 --- a/tests/gem_exec_nop.c +++ b/tests/gem_exec_nop.c @@ -68,14 +68,6 @@ static int gem_write(int fd, return drmIoctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &pwrite); } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - - close.handle = handle; - (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); -} - static void gem_sync(int fd, uint32_t handle) { struct drm_i915_gem_set_domain set_domain; diff --git a/tests/gem_gtt_speed.c b/tests/gem_gtt_speed.c index a406a242..6bb229c4 100644 --- a/tests/gem_gtt_speed.c +++ b/tests/gem_gtt_speed.c @@ -98,14 +98,6 @@ static int gem_read(int fd, return drmIoctl(fd, DRM_IOCTL_I915_GEM_PREAD, &pread); } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - - close.handle = handle; - (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); -} - static double elapsed(const struct timeval *start, const struct timeval *end, int loop) diff --git a/tests/gem_linear_blits.c b/tests/gem_linear_blits.c index 14cf4f4b..9bdf2e1b 100644 --- a/tests/gem_linear_blits.c +++ b/tests/gem_linear_blits.c @@ -66,16 +66,6 @@ static uint32_t gem_create(int fd, int size) return create.handle; } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static uint64_t gem_aperture_size(int fd) { diff --git a/tests/gem_mmap_gtt.c b/tests/gem_mmap_gtt.c index 7f6b2dae..35e388f5 100644 --- a/tests/gem_mmap_gtt.c +++ b/tests/gem_mmap_gtt.c @@ -87,16 +87,6 @@ static void gem_read(int fd, assert(ret == 0); } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static void set_domain(int fd, uint32_t handle) { struct drm_i915_gem_set_domain set_domain; diff --git a/tests/gem_pwrite.c b/tests/gem_pwrite.c index e43655ee..a1a57bd3 100644 --- a/tests/gem_pwrite.c +++ b/tests/gem_pwrite.c @@ -75,14 +75,6 @@ static int gem_write(int fd, return drmIoctl(fd, DRM_IOCTL_I915_GEM_PWRITE, &pwrite); } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - - close.handle = handle; - (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); -} - static void do_gem_write(int fd, uint32_t handle, void *buf, int len, int loops) { while (loops--) diff --git a/tests/gem_vmap_blits.c b/tests/gem_vmap_blits.c index 05550a41..72be1636 100644 --- a/tests/gem_vmap_blits.c +++ b/tests/gem_vmap_blits.c @@ -107,16 +107,6 @@ static void gem_vmap_sync(int fd, uint32_t handle) assert(ret == 0); } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static uint64_t gem_aperture_size(int fd) { diff --git a/tests/gen3_mixed_blits.c b/tests/gen3_mixed_blits.c index 1ebc773f..4f868201 100644 --- a/tests/gen3_mixed_blits.c +++ b/tests/gen3_mixed_blits.c @@ -77,16 +77,6 @@ static uint32_t gem_create(int fd, int size) return create.handle; } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static uint64_t gem_aperture_size(int fd) { diff --git a/tests/gen3_render_linear_blits.c b/tests/gen3_render_linear_blits.c index 33dee69c..209029f4 100644 --- a/tests/gen3_render_linear_blits.c +++ b/tests/gen3_render_linear_blits.c @@ -77,16 +77,6 @@ static uint32_t gem_create(int fd, int size) return create.handle; } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static uint64_t gem_aperture_size(int fd) { diff --git a/tests/gen3_render_mixed_blits.c b/tests/gen3_render_mixed_blits.c index 72a4b0a6..9be93f0b 100644 --- a/tests/gen3_render_mixed_blits.c +++ b/tests/gen3_render_mixed_blits.c @@ -77,16 +77,6 @@ static uint32_t gem_create(int fd, int size) return create.handle; } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static uint64_t gem_aperture_size(int fd) { diff --git a/tests/gen3_render_tiledx_blits.c b/tests/gen3_render_tiledx_blits.c index 1636027a..5c4f1392 100644 --- a/tests/gen3_render_tiledx_blits.c +++ b/tests/gen3_render_tiledx_blits.c @@ -77,16 +77,6 @@ static uint32_t gem_create(int fd, int size) return create.handle; } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static uint64_t gem_aperture_size(int fd) { diff --git a/tests/gen3_render_tiledy_blits.c b/tests/gen3_render_tiledy_blits.c index a29d5553..47625b3f 100644 --- a/tests/gen3_render_tiledy_blits.c +++ b/tests/gen3_render_tiledy_blits.c @@ -77,16 +77,6 @@ static uint32_t gem_create(int fd, int size) return create.handle; } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - int ret; - - close.handle = handle; - ret = drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); - assert(ret == 0); -} - static uint64_t gem_aperture_size(int fd) { diff --git a/tests/testdisplay.c b/tests/testdisplay.c index f1092cb6..0db3ec4a 100644 --- a/tests/testdisplay.c +++ b/tests/testdisplay.c @@ -410,14 +410,6 @@ static void *gem_mmap(int fd, uint32_t handle, int size, int prot) return ptr; } -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close; - - close.handle = handle; - (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close); -} - static cairo_surface_t * allocate_surface(int fd, int width, int height, uint32_t depth, uint32_t *handle, int tiled) |