[Intel-gfx] [RFC PATCH 1/2] drm/i915: Return mappable aperture size
Antonio Argenziano
antonio.argenziano at intel.com
Thu Mar 7 19:11:14 UTC 2019
Extend the API to return the mappable aperture size directly in the
I915_GEM_GET_APERTURE IOCTL.
Signed-off-by: Antonio Argenziano <antonio.argenziano at intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_gem.c | 2 ++
include/uapi/drm/i915_drm.h | 5 +++++
2 files changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 0b23cf3be718..d109f6dbe992 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -221,6 +221,8 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data,
args->aper_size = ggtt->vm.total;
args->aper_available_size = args->aper_size - pinned;
+ args->mappable_aperture_size = ggtt->mappable_end;
+
return 0;
}
diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
index aa2d4c73a97d..bcab66664579 100644
--- a/include/uapi/drm/i915_drm.h
+++ b/include/uapi/drm/i915_drm.h
@@ -1284,6 +1284,11 @@ struct drm_i915_gem_get_aperture {
* bytes
*/
__u64 aper_available_size;
+
+ /**
+ * Total size of the mappable aperture.
+ */
+ __u64 mappable_aperture_size;
};
struct drm_i915_get_pipe_from_crtc_id {
--
2.20.1
More information about the Intel-gfx
mailing list