Commit e0cdd1e5 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/mc: allow calling of multiple handlers for a give intr bit

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 3cb0ebdd
...@@ -30,20 +30,20 @@ nouveau_mc_intr(struct nouveau_subdev *subdev) ...@@ -30,20 +30,20 @@ nouveau_mc_intr(struct nouveau_subdev *subdev)
struct nouveau_mc *pmc = nouveau_mc(subdev); struct nouveau_mc *pmc = nouveau_mc(subdev);
const struct nouveau_mc_intr *map = pmc->intr_map; const struct nouveau_mc_intr *map = pmc->intr_map;
struct nouveau_subdev *unit; struct nouveau_subdev *unit;
u32 stat; u32 stat, intr;
stat = nv_rd32(pmc, 0x000100); intr = stat = nv_rd32(pmc, 0x000100);
while (stat && map->stat) { while (stat && map->stat) {
if (stat & map->stat) { if (stat & map->stat) {
unit = nouveau_subdev(subdev, map->unit); unit = nouveau_subdev(subdev, map->unit);
if (unit && unit->intr) if (unit && unit->intr)
unit->intr(unit); unit->intr(unit);
stat &= ~map->stat; intr &= ~map->stat;
} }
map++; map++;
} }
if (stat) { if (intr) {
nv_error(pmc, "unknown intr 0x%08x\n", stat); nv_error(pmc, "unknown intr 0x%08x\n", stat);
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment