drm/i915: Warn if we receive an interrupt after freeing the buffer
authorDamien Lespiau <damien.lespiau@intel.com>
Tue, 15 Oct 2013 17:55:37 +0000 (18:55 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 16 Oct 2013 11:32:14 +0000 (13:32 +0200)
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>
drivers/gpu/drm/i915/i915_irq.c

index 0b218285c2c1fa982adc283e868b18e87d00af89..b201a214279eccf8278110738633bd47f486dc0c 100644 (file)
@@ -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);