]> 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)
commit93159e12353c2a47e5576d642845a91fa00530bf
tree659f23da444f42b11a2e25a6b360883b02fd4a37
parent3447c4c55d0edc95742fdcd91c3efb050546b907
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