]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gem: Avoid gem_context->mutex for simple vma lookup
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Mar 2020 09:28:41 +0000 (09:28 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 23 Mar 2020 11:18:16 +0000 (11:18 +0000)
commit148c989e4b0daaddf9686487f671b4c25a6d365a
tree659f23da444f42b11a2e25a6b360883b02fd4a37
parente5aa8bd7f0394043dedb8171e4dd13f067cf16dc
drm/i915/gem: Avoid gem_context->mutex for simple vma lookup

As we store the handle lookup inside a radix tree, we do not need the
gem_context->mutex except until we need to insert our lookup into the
common radix tree. This takes a small bit of rearranging to ensure that
the lut we insert into the tree is ready prior to actually inserting it
(as soon as it is exposed via the radixtree, it is visible to any other
submission).

v2: For brownie points, remove the goto spaghetti.
v3: Tighten up the closed-handle checks.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200323092841.22240-8-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c