From aa67b22e426f26f8a8d7fe35221fe2a6ceb5d3db Mon Sep 17 00:00:00 2001 From: Daniel Vetter Date: Tue, 10 Jan 2012 14:59:58 +0100 Subject: lib/drmtest: extract gem_set_tiling Way too much copy-pasting going on here. Also fix a compiler warnings in gem_stress while fixup things up. Signed-off-by: Daniel Vetter --- tests/gen3_render_tiledx_blits.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'tests/gen3_render_tiledx_blits.c') diff --git a/tests/gen3_render_tiledx_blits.c b/tests/gen3_render_tiledx_blits.c index a6c72a66..1636027a 100644 --- a/tests/gen3_render_tiledx_blits.c +++ b/tests/gen3_render_tiledx_blits.c @@ -360,22 +360,6 @@ static void *gem_mmap(int fd, uint32_t handle, int size, int prot) return ptr; } -static void gem_set_tiling(int fd, uint32_t handle, int tiling, int stride) -{ - struct drm_i915_gem_set_tiling set_tiling; - int ret; - - do { - set_tiling.handle = handle; - set_tiling.tiling_mode = tiling; - set_tiling.stride = stride; - - ret = ioctl(fd, DRM_IOCTL_I915_GEM_SET_TILING, &set_tiling); - } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); - assert(ret == 0); - assert(set_tiling.tiling_mode == tiling); -} - static uint32_t create_bo(int fd, uint32_t val) { -- cgit v1.2.3