All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/breadcrumbs: Assert that we do not shortcut the current bottom-half
@ 2017-03-14 15:31 Chris Wilson
  2017-03-15  8:31 ` ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2017-03-14 15:31 UTC (permalink / raw)
  To: intel-gfx

We need to ensure that we always serialize updates to the bottom-half
using the breadcrumbs.irq_lock so that we don't race with a concurrent
interrupt handler. This is most important just prior to leaving the
waiter (when the intel_wait will be overwritten), so make sure we are
not the current bottom-half when skipping the irq locks.

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

diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index 2a1ed6d7ad4d..60f5eae5be41 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -286,6 +286,7 @@ static inline void __intel_breadcrumbs_finish(struct intel_breadcrumbs *b,
 					      struct intel_wait *wait)
 {
 	lockdep_assert_held(&b->rb_lock);
+	GEM_BUG_ON(b->irq_wait == wait);
 
 	/* This request is completed, so remove it from the tree, mark it as
 	 * complete, and *then* wake up the associated task.
@@ -511,8 +512,10 @@ void intel_engine_remove_wait(struct intel_engine_cs *engine,
 	 * the tree by the bottom-half to avoid contention on the spinlock
 	 * by the herd.
 	 */
-	if (RB_EMPTY_NODE(&wait->node))
+	if (RB_EMPTY_NODE(&wait->node)) {
+		GEM_BUG_ON(READ_ONCE(b->irq_wait) == wait);
 		return;
+	}
 
 	spin_lock_irq(&b->rb_lock);
 	__intel_engine_remove_wait(engine, wait);
-- 
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] 2+ messages in thread

* ✗ Fi.CI.BAT: failure for drm/i915/breadcrumbs: Assert that we do not shortcut the current bottom-half
  2017-03-14 15:31 [PATCH] drm/i915/breadcrumbs: Assert that we do not shortcut the current bottom-half Chris Wilson
@ 2017-03-15  8:31 ` Patchwork
  0 siblings, 0 replies; 2+ messages in thread
From: Patchwork @ 2017-03-15  8:31 UTC (permalink / raw)
  To: Chris Wilson; +Cc: intel-gfx

== Series Details ==

Series: drm/i915/breadcrumbs: Assert that we do not shortcut the current bottom-half
URL   : https://patchwork.freedesktop.org/series/21229/
State : failure

== Summary ==

Series 21229v1 drm/i915/breadcrumbs: Assert that we do not shortcut the current bottom-half
https://patchwork.freedesktop.org/api/1.0/series/21229/revisions/1/mbox/

Test gem_exec_flush:
        Subgroup basic-batch-kernel-default-uc:
                pass       -> INCOMPLETE (fi-skl-6700k) fdo#100130
                pass       -> INCOMPLETE (fi-skl-6260u)
                pass       -> INCOMPLETE (fi-skl-6700hq) fdo#100130
                pass       -> INCOMPLETE (fi-byt-n2820)
                pass       -> INCOMPLETE (fi-snb-2600) fdo#100007
                pass       -> INCOMPLETE (fi-skl-6770hq) fdo#100130
                pass       -> INCOMPLETE (fi-bdw-5557u)
                pass       -> INCOMPLETE (fi-bxt-j4205)
                pass       -> INCOMPLETE (fi-bxt-t5700)
        Subgroup basic-batch-kernel-default-wb:
                pass       -> INCOMPLETE (fi-ivb-3770)
        Subgroup basic-uc-pro-default:
                pass       -> INCOMPLETE (fi-snb-2520m)
                pass       -> INCOMPLETE (fi-bsw-n3050)
Test gem_exec_suspend:
        Subgroup basic:
                pass       -> INCOMPLETE (fi-byt-j1900)
Test gem_sync:
        Subgroup basic-many-each:
                pass       -> INCOMPLETE (fi-ilk-650)

fdo#100130 https://bugs.freedesktop.org/show_bug.cgi?id=100130
fdo#100007 https://bugs.freedesktop.org/show_bug.cgi?id=100007

fi-bdw-5557u     total:51   pass:49   dwarn:0   dfail:0   fail:0   skip:1   time: 0s
fi-bsw-n3050     total:53   pass:45   dwarn:0   dfail:0   fail:0   skip:7   time: 0s
fi-bxt-j4205     total:51   pass:43   dwarn:0   dfail:0   fail:0   skip:7   time: 0s
fi-bxt-t5700     total:51   pass:43   dwarn:0   dfail:0   fail:0   skip:7   time: 0s
fi-byt-j1900     total:107  pass:94   dwarn:0   dfail:0   fail:0   skip:12  time: 0s
fi-byt-n2820     total:51   pass:41   dwarn:0   dfail:0   fail:0   skip:9   time: 0s
fi-ilk-650       total:149  pass:117  dwarn:0   dfail:0   fail:0   skip:31  time: 0s
fi-ivb-3770      total:52   pass:42   dwarn:0   dfail:0   fail:0   skip:9   time: 0s
fi-skl-6260u     total:51   pass:49   dwarn:0   dfail:0   fail:0   skip:1   time: 0s
fi-skl-6700hq    total:51   pass:43   dwarn:0   dfail:0   fail:0   skip:7   time: 0s
fi-skl-6700k     total:51   pass:43   dwarn:0   dfail:0   fail:0   skip:7   time: 0s
fi-skl-6770hq    total:51   pass:49   dwarn:0   dfail:0   fail:0   skip:1   time: 0s
fi-snb-2520m     total:53   pass:42   dwarn:0   dfail:0   fail:0   skip:10  time: 0s
fi-snb-2600      total:51   pass:40   dwarn:0   dfail:0   fail:0   skip:10  time: 0s
fi-hsw-4770 failed to connect after reboot
fi-hsw-4770r failed to connect after reboot
fi-ivb-3520m failed to connect after reboot
fi-kbl-7500u failed to connect after reboot

c641417b70c6b78efca29ae732d7cbf5716ac6d5 drm-tip: 2017y-03m-14d-16h-04m-56s UTC integration manifest
10dfc6b drm/i915/breadcrumbs: Assert that we do not shortcut the current bottom-half

== Logs ==

For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_4167/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2017-03-15  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-14 15:31 [PATCH] drm/i915/breadcrumbs: Assert that we do not shortcut the current bottom-half Chris Wilson
2017-03-15  8:31 ` ✗ Fi.CI.BAT: failure for " Patchwork

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.