FAILED: patch "[PATCH] drm/i915/breadcrumbs: Ignore unsubmitted signalers" failed to apply to 4.16-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 4.16-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
fd10e2ce9905030d922e179a8047a4d50daffd8eMon Sep 17 00:00:00 2001
From: Chris Wilson <[email protected]>
Date: Tue, 6 Feb 2018 09:46:33 +0000
Subject: [PATCH] drm/i915/breadcrumbs: Ignore unsubmitted signalers
When a request is preempted, it is unsubmitted from the HW queue and removed from the active list of breadcrumbs. In the process, this however triggers the signaler and it may see the clear rbtree with the old, and still valid, seqno, or it may match the cleared seqno with the now zero rq->global_seqno. This confuses the signaler into action and signaling the fence.
drivers/gpu/drm/i915/intel_breadcrumbs.c +4 -16
@@ -588,29 +588,16 @@ void intel_engine_remove_wait(struct intel_engine_cs *engine,spin_unlock_irq (&b->rb_lock); } -static bool signal_valid (const struct drm_i915_gem_request *request) -{ -return intel_wait_check_request (&request->signaling.wait, request); -} -static bool signal_complete (const struct drm_i915_gem_request *request) {if (!request)return false; -/* If another process served as the bottom-half it may have already -* signalled that this wait is already completed. -*/ -if (intel_wait_complete (&request->signaling.wait)) -return signal_valid (request); - -/* Carefully check if the request is complete, giving time for the +/* +* Carefully check if the request is complete, giving time for the * seqno to be visible or if the GPU hung. */ -if (__i915_request_irq_complete (request)) -return true; - -return false; +return __i915_request_irq_complete (request); }static struct drm_i915_gem_request *to_signaler (struct rb_node *rb)
@@ -712,6 +699,7 @@ static int intel_breadcrumbs_signaler(void *arg) &request->fence.flags)) {local_bh_disable ();dma_fence_signal (&request->fence); +GEM_BUG_ON (!i915_gem_request_completed (request));local_bh_enable ();/* kick start the tasklets */ }