OSDN Git Service

drm/i915/gt: Protect execlists_hold/unhold from new waiters
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Feb 2020 11:02:13 +0000 (11:02 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 7 Feb 2020 13:07:28 +0000 (13:07 +0000)
commit793c226173675ea7f8591d22803a1432e2b724e0
tree1e7773a8568888c759ae83b3976f5a220a109ebf
parent5eae8ca3738e8bec249d68422d9323cea670ff42
drm/i915/gt: Protect execlists_hold/unhold from new waiters

As we may add new waiters to a request as it is being run, we need to
mark the list iteration as being safe for concurrent addition.

v2: Mika spotted that we used the same trick for signalers_list, so warn
the compiler about the lockless walk there as well.

Fixes: 32ff621fd744 ("drm/i915/gt: Allow temporary suspension of inflight requests")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200207110213.2734386-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/i915_scheduler.c