drm/nouveau/mc: allow calling of multiple handlers for a give intr bit
authorBen Skeggs <bskeggs@redhat.com>
Thu, 22 Nov 2012 02:49:42 +0000 (12:49 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 28 Nov 2012 23:58:03 +0000 (09:58 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/subdev/mc/base.c

index de5721cfc4c26b05e49dc00fed1311e39d134de4..8379aafa6e1bb149faaf4d2677c04df7ade4080a 100644 (file)
@@ -30,20 +30,20 @@ nouveau_mc_intr(struct nouveau_subdev *subdev)
        struct nouveau_mc *pmc = nouveau_mc(subdev);
        const struct nouveau_mc_intr *map = pmc->intr_map;
        struct nouveau_subdev *unit;
-       u32 stat;
+       u32 stat, intr;
 
-       stat = nv_rd32(pmc, 0x000100);
+       intr = stat = nv_rd32(pmc, 0x000100);
        while (stat && map->stat) {
                if (stat & map->stat) {
                        unit = nouveau_subdev(subdev, map->unit);
                        if (unit && unit->intr)
                                unit->intr(unit);
-                       stat &= ~map->stat;
+                       intr &= ~map->stat;
                }
                map++;
        }
 
-       if (stat) {
+       if (intr) {
                nv_error(pmc, "unknown intr 0x%08x\n", stat);
        }
 }