All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Add a warning on shutdown if signal threads still active
@ 2016-11-21  9:40 Chris Wilson
  2016-11-21 10:16 ` ✓ Fi.CI.BAT: success for " Patchwork
  2016-11-21 10:42 ` [PATCH] " Tvrtko Ursulin
  0 siblings, 2 replies; 5+ messages in thread
From: Chris Wilson @ 2016-11-21  9:40 UTC (permalink / raw)
  To: intel-gfx

When unloading the module, it is expected that we have finished
executing all requests and so the signal threads should be idle. Add a
warning in case there are any residual requests in the signaler rbtrees
at that point.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/intel_breadcrumbs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_breadcrumbs.c b/drivers/gpu/drm/i915/intel_breadcrumbs.c
index c9c46a538edb..b7006e90a167 100644
--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c
+++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c
@@ -623,6 +623,8 @@ void intel_engine_fini_breadcrumbs(struct intel_engine_cs *engine)
 {
 	struct intel_breadcrumbs *b = &engine->breadcrumbs;
 
+	WARN_ON(READ_ONCE(b->first_signal));
+	WARN_ON(!RB_EMPTY_ROOT(&b->signals));
 	if (!IS_ERR_OR_NULL(b->signaler))
 		kthread_stop(b->signaler);
 
-- 
2.10.2

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

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

end of thread, other threads:[~2016-11-21 10:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-21  9:40 [PATCH] drm/i915: Add a warning on shutdown if signal threads still active Chris Wilson
2016-11-21 10:16 ` ✓ Fi.CI.BAT: success for " Patchwork
2016-11-21 10:42 ` [PATCH] " Tvrtko Ursulin
2016-11-21 10:48   ` Chris Wilson
2016-11-21 10:53     ` Tvrtko Ursulin

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.