drm/nouveau/mc: fetch NV_PMC_INTR again after re-arming MSI
authorBen Skeggs <bskeggs@redhat.com>
Fri, 11 Oct 2013 04:56:39 +0000 (14:56 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Fri, 8 Nov 2013 05:39:05 +0000 (15:39 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/mc/base.c

index b64372298f149926ee9fbee68a9e03c7f321da0e..525d40dcc3ffdcef84ebad871a7b2e0a344a8c57 100644 (file)
@@ -31,7 +31,7 @@ nouveau_mc_intr(int irq, void *arg)
        struct nouveau_mc *pmc = arg;
        const struct nouveau_mc_intr *map = pmc->intr_map;
        struct nouveau_subdev *unit;
-       u32 intr, stat;
+       u32 intr;
 
        nv_wr32(pmc, 0x000140, 0x00000000);
        nv_rd32(pmc, 0x000140);
@@ -40,7 +40,11 @@ nouveau_mc_intr(int irq, void *arg)
        if (intr == 0xffffffff) /* likely fallen off the bus */
                intr = 0x00000000;
 
-       if ((stat = intr) != 0) {
+       if (pmc->use_msi)
+               nv_wr08(pmc, 0x088068, 0xff);
+
+       if (intr) {
+               u32 stat = nv_rd32(pmc, 0x000100);
                while (map->stat) {
                        if (intr & map->stat) {
                                unit = nouveau_subdev(pmc, map->unit);
@@ -51,8 +55,6 @@ nouveau_mc_intr(int irq, void *arg)
                        map++;
                }
 
-               if (pmc->use_msi)
-                       nv_wr08(pmc, 0x088068, 0xff);
                if (stat)
                        nv_error(pmc, "unknown intr 0x%08x\n", stat);
        }
This page took 0.025764 seconds and 5 git commands to generate.