diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2020-07-08 18:37:47 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2020-07-08 22:05:50 +0100 |
commit | 89d19b2b456af1b8e009eee5966bf29c850b200a (patch) | |
tree | 653e4b88fad418fd4f600df1c4b96fa062453bca /drivers/gpu/drm/i915/gt/intel_ring_submission.c | |
parent | drm/i915/gt: Replace opencoded i915_gem_object_pin_map() (diff) | |
download | linux-dev-89d19b2b456af1b8e009eee5966bf29c850b200a.tar.xz linux-dev-89d19b2b456af1b8e009eee5966bf29c850b200a.zip |
drm/i915: Release shortlived maps of longlived objects
Some objects we map once during their construction, and then never
access their mappings again, even if they are kept around for the
duration of the driver. Keeping those pages mapped, often vmapped, is
therefore wasteful and we should release the maps as soon as we no
longer need them.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200708173748.32734-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_ring_submission.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_ring_submission.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_ring_submission.c b/drivers/gpu/drm/i915/gt/intel_ring_submission.c index b09b83deecef..94915f668715 100644 --- a/drivers/gpu/drm/i915/gt/intel_ring_submission.c +++ b/drivers/gpu/drm/i915/gt/intel_ring_submission.c @@ -543,7 +543,7 @@ alloc_context_vma(struct intel_engine_cs *engine) vaddr, engine->context_size); i915_gem_object_flush_map(obj); - i915_gem_object_unpin_map(obj); + __i915_gem_object_release_map(obj); } vma = i915_vma_instance(obj, &engine->gt->ggtt->vm, NULL); |