drm/i915: Spin until breadcrumb threads are complete
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 8 Nov 2016 14:37:19 +0000 (14:37 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 9 Nov 2016 15:01:52 +0000 (15:01 +0000)
commit6a5d1db98ef1da5c632640133898aa42d6916c6c
treeda7a2307777e38e2f990cc2bc5ddb89332c94be3
parent677100ce151149e2e578d138fc83bde50bb9f686
drm/i915: Spin until breadcrumb threads are complete

When we need to reset the global seqno on wraparound, we have to wait
until the current rbtrees are drained (or otherwise the next waiter will
be out of sequence). The current mechanism to kick and spin until
complete, may exit too early as it would break if the target thread was
currently running. Instead, we must wake up the threads, but keep
spinning until the trees have been deleted.

In order to appease Tvrtko, busy spin rather than yield().

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161108143719.32215-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/i915_gem_request.c
drivers/gpu/drm/i915/intel_breadcrumbs.c
drivers/gpu/drm/i915/intel_ringbuffer.h