Commit 921be10d authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/mc: implement support for PTOP interrupt routing

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 583f8e4e
......@@ -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);
......
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