drm/i915/gem: Reduce ctx->engines_mutex for get_engines()
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Jan 2021 13:56:11 +0000 (13:56 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Jan 2021 08:00:03 +0000 (08:00 +0000)
commit2d60d3e0a2a286b8d0ff7102fc7555dd33ad3faf
tree39d96492c32f2d88b8f2cf3e16a4a76ac09ced96
parent1a72e7414d15ca417e60649b5dc7375f302e4cdf
drm/i915/gem: Reduce ctx->engines_mutex for get_engines()

Take a snapshot of the ctx->engines, so we can avoid taking the
ctx->engines_mutex for a mere read in get_engines().

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/20210114135612.13210-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c