[Intel-gfx] [PATCH 11/16] drm/i915: Warn if we receive an interrupt after freeing the buffer

Damien Lespiau damien.lespiau at intel.com
Tue Oct 15 19:55:37 CEST 2013


This shouldn't happen as the buffer is freed after disable pipe CRCs,
but better be safe than sorry.

Signed-off-by: Damien Lespiau <damien.lespiau at intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 0b21828..b201a21 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1197,6 +1197,11 @@ static void ivb_pipe_crc_update(struct drm_device *dev, enum pipe pipe)
 	struct intel_pipe_crc_entry *entry;
 	int head, tail;
 
+	if (!pipe_crc->entries) {
+		DRM_ERROR("spurious interrupt\n");
+		return;
+	}
+
 	head = atomic_read(&pipe_crc->head);
 	tail = atomic_read(&pipe_crc->tail);
 
-- 
1.8.3.1




More information about the Intel-gfx mailing list