drm/i915/gem: Take a copy of the engines for context_barrier_task
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Mar 2020 22:17:39 +0000 (22:17 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 11 Mar 2020 22:24:02 +0000 (22:24 +0000)
commit70c96e3978e5b693cf926e6f26fb07bfa440f1f3
tree514db7bed13c2ed9438395d307afd92a1cfce992
parentc02aac25f150d1b7215b9481f8cdd30cc607bedf
drm/i915/gem: Take a copy of the engines for context_barrier_task

When applying the context-barrier, we only care about the current
engines, as the next set of engines will be naturally after the barrier.
So we can skip holding the ctx->engines_mutex while constructing the
request by taking a sneaky reference to the i915_gem_engines instead.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200311221739.30375-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_context.c