]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Pull the context->pin_count dec into the common intel_context_unpin
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 17 May 2018 21:26:33 +0000 (22:26 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 18 May 2018 08:35:28 +0000 (09:35 +0100)
commitfd2692f6ecedf501b08a179e52d9ca958aa45c7f
tree8bbbe810feb8fa2b2ddbd67a6fd7c67be87dd7b8
parent74320573c7abb4410f3a782286d82a883467908d
drm/i915: Pull the context->pin_count dec into the common intel_context_unpin

As all backends implement the same pin_count mechanism and do a
dec-and-test as their first step, pull that into the common
intel_context_unpin(). This also pulls into the caller, eliminating the
indirect call in the usual steady state case. The intel_context_pin()
side is a little more complicated as it combines the lookup/alloc as
well as pinning the state, and so is left for a later date.

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/20180517212633.24934-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_context.h
drivers/gpu/drm/i915/intel_lrc.c
drivers/gpu/drm/i915/intel_ringbuffer.c
drivers/gpu/drm/i915/selftests/mock_engine.c