drm/qxl: return IRQ_NONE if it was not our irq
authorJason Wang <[email protected]>
Mon, 12 May 2014 08:35:39 +0000 (16:35 +0800)
committerDave Airlie <[email protected]>
Wed, 16 Jul 2014 22:08:06 +0000 (08:08 +1000)
Return IRQ_NONE if it was not our irq. This is necessary for the case
when qxl is sharing irq line with a device A in a crash kernel. If qxl
is initialized before A and A's irq was raised during this gap,
returning IRQ_HANDLED in this case will cause this irq to be raised
again after EOI since kernel think it was handled but in fact it was
not.

Cc: Gerd Hoffmann <[email protected]>
Cc: [email protected]
Signed-off-by: Jason Wang <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
drivers/gpu/drm/qxl/qxl_irq.c

index 34d6a85e9023655efd5c67bd6b1e67d20b34b1bc..0bf1e20c6e44cee16a4c11b18b7903713e4707a9 100644 (file)
@@ -33,6 +33,9 @@ irqreturn_t qxl_irq_handler(int irq, void *arg)
 
        pending = xchg(&qdev->ram_header->int_pending, 0);
 
+       if (!pending)
+               return IRQ_NONE;
+
        atomic_inc(&qdev->irq_received);
 
        if (pending & QXL_INTERRUPT_DISPLAY) {