drm/i915/gem: Limit struct_mutex to eb_reserve
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Mar 2020 07:16:14 +0000 (07:16 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Mar 2020 10:58:05 +0000 (10:58 +0000)
commitef398881d27dd6cb43f5f353f282135e5168d6bb
tree0d159cc6d07b803c0c5b8f8719ad3ed6fb5f6562
parent26fc4e4ba1605e365482a86ec8f33d91552db271
drm/i915/gem: Limit struct_mutex to eb_reserve

We only need to serialise the multiple pinning during the eb_reserve
phase. Ideally this would be using the vm->mutex as an outer lock, or
using a composite global mutex (ww_mutex), but at the moment we are
using struct_mutex for the group.

Closes: https://gitlab.freedesktop.org/drm/intel/issues/1381
Fixes: 003d8b9143a6 ("drm/i915/gem: Only call eb_lookup_vma once during execbuf ioctl")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200306071614.2846708-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/i915_drv.h