public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Warn when execlists changes context without IRQs
@ 2015-05-11 15:03 Peter Antoine
  2015-05-11 16:37 ` Daniel Vetter
  2015-05-15  3:41 ` shuang.he
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Antoine @ 2015-05-11 15:03 UTC (permalink / raw)
  To: intel-gfx; +Cc: daniel.vetter

If an batch ends while the IRQs are not turned on the notification can
go missing and the GPU can hang. So generate a warning in this case.

Signed-off-by: Peter Antoine <peter.antoine@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 0fa9209..0413b8f 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -394,6 +394,12 @@ static void execlists_context_unqueue(struct intel_engine_cs *ring)
 
 	assert_spin_locked(&ring->execlist_lock);
 
+	/*
+	 * If irqs are not active generate a warning as batches that finish
+	 * without the irqs may get lost and a GPU Hang may occur.
+	 */
+	WARN_ON(!intel_irqs_enabled(ring->dev->dev_private));
+
 	if (list_empty(&ring->execlist_queue))
 		return;
 
-- 
1.9.1

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

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

end of thread, other threads:[~2015-05-15  3:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11 15:03 [PATCH] drm/i915: Warn when execlists changes context without IRQs Peter Antoine
2015-05-11 16:37 ` Daniel Vetter
2015-05-11 20:26   ` Chris Wilson
2015-05-12  6:42     ` Daniel Vetter
2015-05-12  8:18       ` Chris Wilson
2015-05-12  8:42         ` Daniel Vetter
2015-05-12  8:48           ` Chris Wilson
2015-05-15  3:41 ` shuang.he

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox