drm/i915/gt: Drop mutex serialisation between context pin/unpin
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Jan 2020 11:42:33 +0000 (11:42 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Jan 2020 14:38:57 +0000 (14:38 +0000)
commit8413502238168561acf1e2137eaea6af4004e506
tree18712f891e3c62867def3dbb412b43a8f62e65ac
parent3fbbbef4f56a94c1b71b342b8157990430375f97
drm/i915/gt: Drop mutex serialisation between context pin/unpin

The last remaining reason for serialising the pin/unpin of the
intel_context is to ensure that our preallocated wakerefs are not
consumed too early (i.e. the unpin of the previous phase does not emit
the idle barriers for this phase before we even submit). All of the
other operations within the context pin/unpin are supposed to be
atomic...  Therefore, we can reduce the serialisation to being just on
the i915_active.preallocated_barriers itself and drop the nested
pin_mutex from intel_context_unpin().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200106114234.2529613-5-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_context.c
drivers/gpu/drm/i915/i915_active.c