diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2016-04-08 17:24:40 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2016-05-20 14:43:04 +1000 |
commit | 921be10d85ca10973b374ef10273c2f228081ee8 (patch) | |
tree | 68d07bcc4e8e2d8551c8360f8da55a7e82cfc452 | |
parent | 583f8e4ea216d9d0212e63ede384893ec0c1b742 (diff) |
drm/nouveau/mc: implement support for PTOP interrupt routing
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c index 134d44aba1e5..184325cdc138 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/mc/base.c @@ -60,9 +60,18 @@ nvkm_mc_intr(struct nvkm_mc *mc, bool *handled) struct nvkm_device *device = mc->subdev.device; struct nvkm_subdev *subdev; const struct nvkm_mc_map *map = mc->func->intr; - u32 stat, intr; + u32 stat, intr = nvkm_mc_intr_mask(mc); + u64 subdevs; + + stat = nvkm_top_intr(device->top, intr, &subdevs); + while (subdevs) { + enum nvkm_devidx subidx = __ffs64(subdevs); + subdev = nvkm_device_subdev(device, subidx); + if (subdev) + nvkm_subdev_intr(subdev); + subdevs &= ~BIT_ULL(subidx); + } - stat = intr = nvkm_mc_intr_mask(mc); while (map->stat) { if (intr & map->stat) { subdev = nvkm_device_subdev(device, map->unit); |