Skip to content

Commit

Permalink
drm/nouveau/mc: allow calling of multiple handlers for a give intr bit
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Nov 28, 2012
1 parent 3cb0ebd commit e0cdd1e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/gpu/drm/nouveau/core/subdev/mc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit e0cdd1e

Please sign in to comment.