[igt-dev] [PATCH i-g-t 6/6] lib/ioctl_wrapper: remove __gem_mmap__cpu and __gem_mmap__wc
Lukasz Kalamarz
lukasz.kalamarz at intel.com
Wed Jan 9 17:40:57 UTC 2019
After fixing all dependencies within IGT, we can remove
obsolted code from lib.
Signed-off-by: Lukasz Kalamarz <lukasz.kalamarz at intel.com>
Cc: Michal Winiarski <michal.winiarski at intel.com>
Cc: Katarzyna Dec <katarzyna.dec at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
---
lib/ioctl_wrappers.c | 63 --------------------------------------------
lib/ioctl_wrappers.h | 2 --
2 files changed, 65 deletions(-)
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 87744edc..1874230d 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -775,39 +775,6 @@ void *__gem_mmap(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsign
return from_user_pointer(arg.addr_ptr);
}
-/**
- * __gem_mmap__wc:
- * @fd: open i915 drm file descriptor
- * @handle: gem buffer object handle
- * @offset: offset in the gem buffer of the mmap arena
- * @size: size of the mmap arena
- * @prot: memory protection bits as used by mmap()
- *
- * This functions wraps up procedure to establish a memory mapping through
- * direct cpu access, bypassing the gpu and cpu caches completely and also
- * bypassing the GTT system agent (i.e. there is no automatic tiling of
- * the mmapping through the fence registers).
- *
- * Returns: A pointer to the created memory mapping, NULL on failure.
- */
-void *__gem_mmap__wc(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot)
-{
- struct drm_i915_gem_mmap mmap_arg;
-
- memset(&mmap_arg, 0, sizeof(mmap_arg));
- mmap_arg.handle = handle;
- mmap_arg.offset = offset;
- mmap_arg.size = size;
- mmap_arg.flags = I915_MMAP_WC;
- if (igt_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap_arg))
- return NULL;
-
- VG(VALGRIND_MAKE_MEM_DEFINED(from_user_pointer(mmap_arg.addr_ptr), mmap_arg.size));
-
- errno = 0;
- return from_user_pointer(mmap_arg.addr_ptr);
-}
-
/**
* gem_mmap__wc:
* @fd: open i915 drm file descriptor
@@ -830,36 +797,6 @@ void *gem_mmap__wc(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsi
return ptr;
}
-/**
- * __gem_mmap__cpu:
- * @fd: open i915 drm file descriptor
- * @handle: gem buffer object handle
- * @offset: offset in the gem buffer of the mmap arena
- * @size: size of the mmap arena
- * @prot: memory protection bits as used by mmap()
- *
- * This functions wraps up procedure to establish a memory mapping through
- * direct cpu access, bypassing the gpu completely.
- *
- * Returns: A pointer to the created memory mapping, NULL on failure.
- */
-void *__gem_mmap__cpu(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot)
-{
- struct drm_i915_gem_mmap mmap_arg;
-
- memset(&mmap_arg, 0, sizeof(mmap_arg));
- mmap_arg.handle = handle;
- mmap_arg.offset = offset;
- mmap_arg.size = size;
- if (igt_ioctl(fd, DRM_IOCTL_I915_GEM_MMAP, &mmap_arg))
- return NULL;
-
- VG(VALGRIND_MAKE_MEM_DEFINED(from_user_pointer(mmap_arg.addr_ptr), mmap_arg.size));
-
- errno = 0;
- return from_user_pointer(mmap_arg.addr_ptr);
-}
-
/**
* gem_mmap__cpu:
* @fd: open i915 drm file descriptor
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index 51e66c08..77e69d7f 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -95,8 +95,6 @@ void *gem_mmap__wc(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsi
#endif
void *__gem_mmap__gtt(int fd, uint32_t handle, uint64_t size, unsigned prot);
-void *__gem_mmap__cpu(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot);
-void *__gem_mmap__wc(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot);
void *__gem_mmap(int fd, uint32_t handle, uint64_t offset, uint64_t size, unsigned prot, bool wc);
int gem_munmap(void *ptr, uint64_t size);
--
2.17.2
More information about the igt-dev
mailing list