drm/i915/gem: Split the context's obj:vma lut into its own mutex
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 3 Jul 2020 00:43:06 +0000 (01:43 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 3 Jul 2020 09:13:13 +0000 (10:13 +0100)
commitf7ce8639f6ff7f9445cb18114282371a41ceb840
tree238fa406949ccfa253a0ffadc32798f6eecd0944
parent03fca66b7a36b52da8915341eee388267f6d5b73
drm/i915/gem: Split the context's obj:vma lut into its own mutex

Rather than reuse the common ctx->mutex for locking the execbuffer LUT,
split it into its own lock to avoid being taken [as part of ctx->mutex]
at inappropriate times. In particular to avoid the inversion from taking
the timeline->mutex for the whole execbuf submission in the next patch.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200703004306.11117-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/gem/i915_gem_context_types.h
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
drivers/gpu/drm/i915/gem/i915_gem_object.c
drivers/gpu/drm/i915/gem/selftests/mock_context.c