summaryrefslogtreecommitdiff
path: root/intel/intel_bufmgr_priv.h
diff options
context:
space:
mode:
authorTvrtko Ursulin <tvrtko.ursulin@intel.com>2014-06-19 15:52:03 +0100
committerDamien Lespiau <damien.lespiau@intel.com>2014-09-17 12:15:57 +0100
commitae8edc7544e566084f7b958eb93c9109b471ca30 (patch)
treeeaa01b63273788dd1adbb99112765cba2dd1c3b0 /intel/intel_bufmgr_priv.h
parent86b37c61c78edd1353a3f76f678c39e2ec168771 (diff)
intel: Add support for userptr objects
Allow userptr objects to be created and used via libdrm_intel. At the moment tiling and mapping to GTT aperture is not supported due hardware limitations across different generations and uncertainty about its usefulness. v2: Improved error handling in feature detection per review comments. v3: Rebase on top of the drm_public addition, minor whitespace addition. Reviewed-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> (v3) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1,v2)
Diffstat (limited to 'intel/intel_bufmgr_priv.h')
-rw-r--r--intel/intel_bufmgr_priv.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/intel/intel_bufmgr_priv.h b/intel/intel_bufmgr_priv.h
index 2592d42d..59ebd186 100644
--- a/intel/intel_bufmgr_priv.h
+++ b/intel/intel_bufmgr_priv.h
@@ -62,6 +62,18 @@ struct _drm_intel_bufmgr {
unsigned int alignment);
/**
+ * Allocate a buffer object from an existing user accessible
+ * address malloc'd with the provided size.
+ * Alignment is used when mapping to the gtt.
+ * Flags may be I915_VMAP_READ_ONLY or I915_USERPTR_UNSYNCHRONIZED
+ */
+ drm_intel_bo *(*bo_alloc_userptr)(drm_intel_bufmgr *bufmgr,
+ const char *name, void *addr,
+ uint32_t tiling_mode, uint32_t stride,
+ unsigned long size,
+ unsigned long flags);
+
+ /**
* Allocate a tiled buffer object.
*
* Alignment for tiled objects is set automatically; the 'flags'