OSDN Git Service

drm/i915: Warn when execlists changes context without IRQs
authorPeter Antoine <peter.antoine@intel.com>
Mon, 11 May 2015 15:03:27 +0000 (16:03 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 20 May 2015 09:25:44 +0000 (11:25 +0200)
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>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_lrc.c

index 0fa9209..0413b8f 100644 (file)
@@ -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;