diff options
author | Tvrtko Ursulin <tvrtko.ursulin@intel.com> | 2014-06-19 15:52:03 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2014-09-17 12:15:57 +0100 |
commit | ae8edc7544e566084f7b958eb93c9109b471ca30 (patch) | |
tree | eaa01b63273788dd1adbb99112765cba2dd1c3b0 /intel/intel_bufmgr.c | |
parent | 86b37c61c78edd1353a3f76f678c39e2ec168771 (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.c')
-rw-r--r-- | intel/intel_bufmgr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/intel/intel_bufmgr.c b/intel/intel_bufmgr.c index 03dba503..234cd13e 100644 --- a/intel/intel_bufmgr.c +++ b/intel/intel_bufmgr.c @@ -62,6 +62,20 @@ drm_intel_bo_alloc_for_render(drm_intel_bufmgr *bufmgr, const char *name, } drm_public drm_intel_bo * +drm_intel_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) +{ + if (bufmgr->bo_alloc_userptr) + return bufmgr->bo_alloc_userptr(bufmgr, name, addr, tiling_mode, + stride, size, flags); + return NULL; +} + +drm_public drm_intel_bo * drm_intel_bo_alloc_tiled(drm_intel_bufmgr *bufmgr, const char *name, int x, int y, int cpp, uint32_t *tiling_mode, unsigned long *pitch, unsigned long flags) |