[igt-dev] [PATCH i-g-t] lib/ioctl_wrappers: Delete gem_total_mappable_size()

Ashutosh Dixit ashutosh.dixit at intel.com
Mon Apr 27 15:51:38 UTC 2020


gem_total_mappable_size() has no callers and calls the
DRM_I915_GEM_GET_APERTURE ioctl using 'struct
local_i915_gem_get_aperture' which has fields which are unsupported in
the kernel. Delete the function.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
 lib/ioctl_wrappers.c | 17 -----------------
 lib/ioctl_wrappers.h |  1 -
 2 files changed, 18 deletions(-)

diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index 627717d2b..25d04b3e6 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -980,23 +980,6 @@ struct local_i915_gem_get_aperture {
 };
 #define DRM_I915_GEM_GET_APERTURE	0x23
 #define LOCAL_IOCTL_I915_GEM_GET_APERTURE DRM_IOR  (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct local_i915_gem_get_aperture)
-/**
- * gem_total_mappable_size:
- * @fd: open i915 drm file descriptor
- *
- * Feature test macro to query the kernel for the total mappable size.
- *
- * Returns: Total mappable address space size.
- */
-uint64_t gem_total_mappable_size(int fd)
-{
-	struct local_i915_gem_get_aperture aperture;
-
-	memset(&aperture, 0, sizeof(aperture));
-	do_ioctl(fd, LOCAL_IOCTL_I915_GEM_GET_APERTURE, &aperture);
-
-	return aperture.map_total_size;
-}
 
 /**
  * gem_total_stolen_size:
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h
index 9b29fce81..799d90266 100644
--- a/lib/ioctl_wrappers.h
+++ b/lib/ioctl_wrappers.h
@@ -132,7 +132,6 @@ int gem_gpu_reset_type(int fd);
 bool gem_gpu_reset_enabled(int fd);
 bool gem_engine_reset_enabled(int fd);
 int gem_available_fences(int fd);
-uint64_t gem_total_mappable_size(int fd);
 uint64_t gem_total_stolen_size(int fd);
 uint64_t gem_available_aperture_size(int fd);
 uint64_t gem_aperture_size(int fd);
-- 
2.26.0



More information about the igt-dev mailing list