summaryrefslogtreecommitdiff
path: root/libdrm/intel/intel_bufmgr_priv.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2009-11-11 13:04:38 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2009-11-11 13:09:22 +0000
commit83a35b68f45cebc70152e55ed3f99db485c9a7cd (patch)
tree258d6150138e5e0fd8b60f8d91a8aa3c19312803 /libdrm/intel/intel_bufmgr_priv.h
parent89cc98c0d5c1b43a883f13210c472339dde1a4cf (diff)
intel: Export madvise
Wrap the madvise ioctl for use in APPLE_object_purgeable. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'libdrm/intel/intel_bufmgr_priv.h')
-rw-r--r--libdrm/intel/intel_bufmgr_priv.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libdrm/intel/intel_bufmgr_priv.h b/libdrm/intel/intel_bufmgr_priv.h
index 475c402f..febee0f7 100644
--- a/libdrm/intel/intel_bufmgr_priv.h
+++ b/libdrm/intel/intel_bufmgr_priv.h
@@ -216,6 +216,20 @@ struct _drm_intel_bufmgr {
*/
int (*bo_busy) (drm_intel_bo *bo);
+ /**
+ * Specify the volatility of the buffer.
+ * \param bo Buffer to create a name for
+ * \param madv The purgeable status
+ *
+ * Use I915_MADV_DONTNEED to mark the buffer as purgeable, and it will be
+ * reclaimed under memory pressure. If you subsequently require the buffer,
+ * then you must pass I915_MADV_WILLNEED to mark the buffer as required.
+ *
+ * Returns 1 if the buffer was retained, or 0 if it was discarded whilst
+ * marked as I915_MADV_DONTNEED.
+ */
+ int (*bo_madvise) (drm_intel_bo *bo, int madv);
+
int (*check_aperture_space) (drm_intel_bo ** bo_array, int count);
/**