diff options
author | Peter Antoine <peter.antoine@intel.com> | 2015-05-11 16:03:27 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-05-20 11:25:44 +0200 |
commit | 779949f4b1968d28229e7375fd199f54ed883dc4 (patch) | |
tree | ad6f533362d1c013a3c75977d46d2cbe1c1a2b43 /drivers/gpu/drm/i915/intel_lrc.c | |
parent | 2614f17d2d2dcf2f8c1a2f4f0ada056ed60d7d8f (diff) | |
download | talos-obmc-linux-779949f4b1968d28229e7375fd199f54ed883dc4.tar.gz talos-obmc-linux-779949f4b1968d28229e7375fd199f54ed883dc4.zip |
drm/i915: Warn when execlists changes context without IRQs
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>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_lrc.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_lrc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 0fa9209ff556..0413b8f85c55 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; |