Browse Source

drm/i915: Warn if we receive an interrupt after freeing the buffer

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@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Damien Lespiau 11 years ago
parent
commit
0c912c79ee
1 changed files with 5 additions and 0 deletions
  1. 5 0
      drivers/gpu/drm/i915/i915_irq.c

+ 5 - 0
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);