drm/i915/gt: Eliminate the trylock for reading a timeline's hwsp
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Dec 2019 01:16:59 +0000 (01:16 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 17 Dec 2019 16:59:48 +0000 (16:59 +0000)
commit85bedbf191e82aac0d7f05623bccfeccdcd91cea
tree1c47a592c3479b96f443acec68997caaa8424399
parente14177f19739d74839eb496a27f5f5d958beaa5b
drm/i915/gt: Eliminate the trylock for reading a timeline's hwsp

As we stash a pointer to the HWSP cacheline on the request, when reading
it we only need confirm that the cacheline is still valid by checking
that the request and timeline are still intact.

v2: Protect hwsp_cachline with RCU

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/20191217011659.3092130-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_timeline.c
drivers/gpu/drm/i915/gt/intel_timeline_types.h
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/i915_request.h