]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Eliminate the trylock for awaiting an earlier request
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Dec 2019 16:53:17 +0000 (16:53 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 16 Dec 2019 23:25:49 +0000 (23:25 +0000)
commita7c7f9c2a567469f18dcf059a2d4feaa81c58306
tree4b8ab99b174f0e6aaa98b7f7c7d2f56dbb911899
parent43e19be3127a6bd44b4bf05df3e75a3155fbc7ad
drm/i915: Eliminate the trylock for awaiting an earlier request

We currently use an error-prone mutex_trylock to grab another timeline
to find an earlier request along it. However, with a bit of a
sleight-of-hand, we can reduce the mutex_trylock to a spin_lock on the
immediate request and careful pointer chasing to acquire a reference on
the previous request.

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/20191216165317.2742896-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_request.c