]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Introduce a mutex for file_priv->context_idr
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Mar 2019 14:07:09 +0000 (14:07 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 21 Mar 2019 15:59:27 +0000 (15:59 +0000)
commitabd65c0a35b9fd2e462fdd6fde4f5eb7561dc302
tree59b6430eb22942ef6d2df9b202720fdb4d3fbb51
parent50b3d2262655ac1f12d73568c74a28fc1c4d0590
drm/i915: Introduce a mutex for file_priv->context_idr

Define a mutex for the exclusive use of interacting with the per-file
context-idr, that was previously guarded by struct_mutex. This allows us
to reduce the coverage of struct_mutex, with a view to removing the last
bits coordinating GEM context later. (In the short term, we avoid taking
struct_mutex while using the extended constructor functions, preventing
some nasty recursion.)

v2: s/context_lock/context_idr_lock/

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190321140711.11190-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem_context.c