Skip to content

Commit

Permalink
drm/i915: Don't pin the object pages during pending vma binds
Browse files Browse the repository at this point in the history
A pin-count is already held by vma->pages so taking an additional pin
during async binds is not necessary.

When we introduce async unbinding we have other means of keeping the
object pages alive.

Signed-off-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220110172219.107131-4-thomas.hellstrom@linux.intel.com
  • Loading branch information
Thomas Hellström committed Jan 11, 2022
1 parent 39a2bd3 commit ebf3c36
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/gpu/drm/i915/i915_vma.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,8 @@ static void __vma_release(struct dma_fence_work *work)
{
struct i915_vma_work *vw = container_of(work, typeof(*vw), base);

if (vw->pinned) {
__i915_gem_object_unpin_pages(vw->pinned);
if (vw->pinned)
i915_gem_object_put(vw->pinned);
}

i915_vm_free_pt_stash(vw->vm, &vw->stash);
i915_vm_put(vw->vm);
Expand Down Expand Up @@ -477,7 +475,6 @@ int i915_vma_bind(struct i915_vma *vma,

work->base.dma.error = 0; /* enable the queue_work() */

__i915_gem_object_pin_pages(vma->obj);
work->pinned = i915_gem_object_get(vma->obj);
} else {
if (vma->obj) {
Expand Down

0 comments on commit ebf3c36

Please sign in to comment.