diff options
author | Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com> | 2022-07-01 15:50:48 -0700 |
---|---|---|
committer | Andi Shyti <andi.shyti@linux.intel.com> | 2022-07-27 14:01:32 +0000 |
commit | 6d4a81033fc07aef3ef210eff4f54243479d109c (patch) | |
tree | 1a882a8d645f8c4fe9a528722fc7bfaec87aebc3 /drivers/gpu/drm/i915/gem/i915_gem_ttm.c | |
parent | 4d69cd8e3f92fe08b300a1e7868fc1c882b5fc78 (diff) |
drm/i915/vm_bind: Support private and shared BOs
Add uapi allowing user to specify a BO as private to a specified VM
during the BO creation.
VM private BOs can only be mapped on the specified VM and can't be
dma_buf exported. VM private BOs share a single common dma_resv object,
hence has a performance advantage requiring a single dma_resv object
update in the execbuf path compared to non-private (shared) BOs.
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_ttm.c')
-rw-r--r-- | drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index 5a5cf332d8a5..98cc2d1e4d12 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c @@ -1159,6 +1159,9 @@ void i915_ttm_bo_destroy(struct ttm_buffer_object *bo) i915_gem_object_release_memory_region(obj); mutex_destroy(&obj->ttm.get_io_page.lock); + if (obj->priv_root) + i915_gem_object_put(obj->priv_root); + if (obj->ttm.created) { /* * We freely manage the shrinker LRU outide of the mm.pages life |