OSDN Git Service

drm/i915/gem: Only call eb_lookup_vma once during execbuf ioctl
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 3 Mar 2020 20:43:45 +0000 (20:43 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 3 Mar 2020 21:52:51 +0000 (21:52 +0000)
commit003d8b9143a69f0d6b08cc85893eabdf95b231e8
treee4442928b1bdaf488cc1439554a97aa64e5b5865
parent7d6236bb13352c27450f2e6639b37c884e41903f
drm/i915/gem: Only call eb_lookup_vma once during execbuf ioctl

As we no longer stash anything inside i915_vma under the exclusive
protection of struct_mutex, we do not need to revoke the i915_vma
stashes before dropping struct_mutex to handle pagefaults. Knowing that
we must drop the struct_mutex while keeping the eb->vma around, means
that we are required to hold onto to the object reference until we have
marked the vma as active.

Fixes: 155ab8836caa ("drm/i915: Move object close under its own lock")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200303204345.1859734-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c