drm/nouveau/fifo: turn chan subdev mask into engine mask

This data is used to know which engines/classes are reachable on a given
channel's runlist, and needs to be replaced with something that doesn't
rely on subdev index.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
This commit is contained in:
Ben Skeggs
2021-02-09 13:01:01 +10:00
parent 496162037c
commit ad3b0d331f
16 changed files with 77 additions and 99 deletions

View File

@@ -118,24 +118,6 @@ nvkm_top_fault(struct nvkm_device *device, int fault)
return NVKM_SUBDEV_NR;
}
enum nvkm_devidx
nvkm_top_engine(struct nvkm_device *device, int index, int *runl, int *engn)
{
struct nvkm_top *top = device->top;
struct nvkm_top_device *info;
int n = 0;
list_for_each_entry(info, &top->device, head) {
if (info->engine >= 0 && info->runlist >= 0 && n++ == index) {
*runl = info->runlist;
*engn = info->engine;
return info->index;
}
}
return -ENODEV;
}
static int
nvkm_top_oneinit(struct nvkm_subdev *subdev)
{