drm/nvc0/pfifo: semi-handle a couple more irqs
authorBen Skeggs <bskeggs@redhat.com>
Fri, 28 Jan 2011 03:42:16 +0000 (13:42 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 24 Feb 2011 20:44:16 +0000 (06:44 +1000)
And also, don't disable PFIFO IRQs completely whenever we recieve one,
just when we don't know about it already.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nvc0_fifo.c

index e6f92c541dba47b1b4d8bbf6a3431c4c5ccb13fb..e9f8643bed9be2350ed9d9f0b971fec672b722f8 100644 (file)
@@ -418,6 +418,12 @@ nvc0_fifo_isr(struct drm_device *dev)
 {
        u32 stat = nv_rd32(dev, 0x002100);
 
+       if (stat & 0x00000100) {
+               NV_INFO(dev, "PFIFO: unknown status 0x00000100\n");
+               nv_wr32(dev, 0x002100, 0x00000100);
+               stat &= ~0x00000100;
+       }
+
        if (stat & 0x10000000) {
                u32 units = nv_rd32(dev, 0x00259c);
                u32 u = units;
@@ -446,10 +452,15 @@ nvc0_fifo_isr(struct drm_device *dev)
                stat &= ~0x20000000;
        }
 
+       if (stat & 0x40000000) {
+               NV_INFO(dev, "PFIFO: unknown status 0x40000000\n");
+               nv_mask(dev, 0x002a00, 0x00000000, 0x00000000);
+               stat &= ~0x40000000;
+       }
+
        if (stat) {
                NV_INFO(dev, "PFIFO: unhandled status 0x%08x\n", stat);
                nv_wr32(dev, 0x002100, stat);
+               nv_wr32(dev, 0x002140, 0);
        }
-
-       nv_wr32(dev, 0x2140, 0);
 }