diff options
Diffstat (limited to 'demos/intel_sprite_on.c')
-rw-r--r-- | demos/intel_sprite_on.c | 51 |
1 files changed, 1 insertions, 50 deletions
diff --git a/demos/intel_sprite_on.c b/demos/intel_sprite_on.c index 1b6e783d..faa3c0f1 100644 --- a/demos/intel_sprite_on.c +++ b/demos/intel_sprite_on.c @@ -44,6 +44,7 @@ #include "xf86drm.h" #include "xf86drmMode.h" #include "i915_drm.h" +#include "drmtest.h" #if defined(DRM_IOCTL_MODE_ADDFB2) && defined(DRM_I915_SET_SPRITE_COLORKEY) #define TEST_PLANES 1 @@ -373,56 +374,6 @@ static void connector_find_preferred_mode( //***************************************************************************** // -// gem_create -// -//***************************************************************************** -static uint32_t gem_create(int fd, int size) -{ - struct drm_i915_gem_create create; - - create.handle = 0; - create.size = (size + 4095) & -4096; - (void)drmIoctl(fd, DRM_IOCTL_I915_GEM_CREATE, &create); - - return create.handle; -} - -//***************************************************************************** -// -// gem_mmap -// -//***************************************************************************** -static void *gem_mmap(int fd, uint32_t handle, int size, int prot) -{ - struct drm_i915_gem_mmap_gtt mmap_arg; - void *ptr; - - mmap_arg.handle = handle; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_MMAP_GTT, &mmap_arg)) - return NULL; - - ptr = mmap(0, size, prot, MAP_SHARED, fd, mmap_arg.offset); - if (ptr == MAP_FAILED) - ptr = NULL; - - return ptr; -} - -//***************************************************************************** -// -// gem_close -// -//***************************************************************************** -static void gem_close(int fd, uint32_t handle) -{ - struct drm_gem_close close_st; - - close_st.handle = handle; - (void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close_st); -} - -//***************************************************************************** -// // connector_find_plane // //***************************************************************************** |