All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Recheck breadcrumb seqno after an interrupt
@ 2017-02-16  9:29 Chris Wilson
  2017-02-16  9:29 ` [PATCH 2/2] drm/i915: Postpone fake breadcrumb interrupt if a real interrupt is pending Chris Wilson
  2017-02-16 10:21 ` [PATCH 1/2] drm/i915: Recheck breadcrumb seqno after an interrupt Tvrtko Ursulin
  0 siblings, 2 replies; 20+ messages in thread
From: Chris Wilson @ 2017-02-16  9:29 UTC (permalink / raw)
  To: intel-gfx

If an interrupt arrives whilst we are performing the irq-seqno barrier,
recheck the seqno again before returning.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
 drivers/gpu/drm/i915/i915_drv.h | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index c1b400f1ede4..ecb8b414bdd2 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -4102,6 +4102,9 @@ __i915_request_irq_complete(const struct drm_i915_gem_request *req)
 	if (__i915_gem_request_completed(req, seqno))
 		return true;
 
+	if (!engine->irq_seqno_barrier)
+		return false;
+
 	/* Ensure our read of the seqno is coherent so that we
 	 * do not "miss an interrupt" (i.e. if this is the last
 	 * request and the seqno write from the GPU is not visible
@@ -4113,8 +4116,7 @@ __i915_request_irq_complete(const struct drm_i915_gem_request *req)
 	 * but it is easier and safer to do it every time the waiter
 	 * is woken.
 	 */
-	if (engine->irq_seqno_barrier &&
-	    test_and_clear_bit(ENGINE_IRQ_BREADCRUMB, &engine->irq_posted)) {
+	while (test_and_clear_bit(ENGINE_IRQ_BREADCRUMB, &engine->irq_posted)) {
 		unsigned long flags;
 
 		/* The ordering of irq_posted versus applying the barrier
-- 
2.11.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2017-02-16 13:48 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-16  9:29 [PATCH 1/2] drm/i915: Recheck breadcrumb seqno after an interrupt Chris Wilson
2017-02-16  9:29 ` [PATCH 2/2] drm/i915: Postpone fake breadcrumb interrupt if a real interrupt is pending Chris Wilson
2017-02-16 10:38   ` Tvrtko Ursulin
2017-02-16 10:47     ` Chris Wilson
2017-02-16 11:17       ` Tvrtko Ursulin
2017-02-16 11:40         ` Chris Wilson
2017-02-16 11:13   ` [PATCH v2] drm/i915: Postpone fake breadcrumb interrupt until real interrupts cease Chris Wilson
2017-02-16 11:42     ` Chris Wilson
2017-02-16 11:44     ` Tvrtko Ursulin
2017-02-16 12:00       ` Chris Wilson
2017-02-16 12:15         ` Tvrtko Ursulin
2017-02-16 10:21 ` [PATCH 1/2] drm/i915: Recheck breadcrumb seqno after an interrupt Tvrtko Ursulin
2017-02-16 10:36   ` Chris Wilson
2017-02-16 10:45     ` Tvrtko Ursulin
2017-02-16 10:50       ` Chris Wilson
2017-02-16 11:19         ` Tvrtko Ursulin
2017-02-16 11:34           ` Chris Wilson
2017-02-16 11:21       ` Chris Wilson
2017-02-16 12:47         ` Tvrtko Ursulin
2017-02-16 13:48           ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.