diff options
author | Michał Winiarski <michal.winiarski@intel.com> | 2015-09-09 16:07:10 +0200 |
---|---|---|
committer | Kristian Høgsberg Kristensen <kristian.h.kristensen@intel.com> | 2015-12-14 11:31:25 -0800 |
commit | 8b4d57e7b75cb0bd01d11ad7f597909034a316aa (patch) | |
tree | bcc8cb7e3a0a9cf1414480b24146f457600fc5af /intel/intel_bufmgr_priv.h | |
parent | 5453f89b70dc4305f8525d5053b2704db2e0e1e7 (diff) | |
download | external_libdrm-8b4d57e7b75cb0bd01d11ad7f597909034a316aa.tar.gz external_libdrm-8b4d57e7b75cb0bd01d11ad7f597909034a316aa.tar.bz2 external_libdrm-8b4d57e7b75cb0bd01d11ad7f597909034a316aa.zip |
intel: Add support for softpin
Softpin allows userspace to take greater control of GPU virtual address
space and eliminates the need of relocations. It can also be used to
mirror addresses between GPU and CPU (shared virtual memory).
Calls to drm_intel_bo_emit_reloc are still required to build the list of
drm_i915_gem_exec_objects at exec time, but no entries in relocs are
created. Self-relocs don't make any sense for softpinned objects and can
indicate a programming errors, thus are forbidden. Softpinned objects
are marked by asterisk in debug dumps.
Cc: Thomas Daniel <thomas.daniel@intel.com>
Cc: Kristian Høgsberg <krh@bitplanet.net>
Cc: Zou Nanhai <nanhai.zou@intel.com>
Cc: Michel Thierry <michel.thierry@intel.com>
Cc: Ben Widawsky <ben@bwidawsk.net>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Kristian Høgsberg <krh@bitplanet.net>
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Diffstat (limited to 'intel/intel_bufmgr_priv.h')
-rw-r--r-- | intel/intel_bufmgr_priv.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/intel/intel_bufmgr_priv.h b/intel/intel_bufmgr_priv.h index 5c17ffbe..7e360a0b 100644 --- a/intel/intel_bufmgr_priv.h +++ b/intel/intel_bufmgr_priv.h @@ -241,6 +241,13 @@ struct _drm_intel_bufmgr { uint32_t * swizzle_mode); /** + * Set the offset at which this buffer will be softpinned + * \param bo Buffer to set the softpin offset for + * \param offset Softpin offset + */ + int (*bo_set_softpin_offset) (drm_intel_bo *bo, uint64_t offset); + + /** * Create a visible name for a buffer which can be used by other apps * * \param buf Buffer to create a name for |