Commit b7da823a authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/falcon: use split type+inst when looking up PRI addr

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent fcc08a7c
...@@ -22,7 +22,7 @@ struct nvkm_top_device { ...@@ -22,7 +22,7 @@ struct nvkm_top_device {
struct list_head head; struct list_head head;
}; };
u32 nvkm_top_addr(struct nvkm_device *, enum nvkm_devidx); u32 nvkm_top_addr(struct nvkm_device *, enum nvkm_subdev_type, int);
u32 nvkm_top_reset(struct nvkm_device *, enum nvkm_subdev_type, int); u32 nvkm_top_reset(struct nvkm_device *, enum nvkm_subdev_type, int);
u32 nvkm_top_intr_mask(struct nvkm_device *, enum nvkm_subdev_type, int); u32 nvkm_top_intr_mask(struct nvkm_device *, enum nvkm_subdev_type, int);
int nvkm_top_fault_id(struct nvkm_device *, enum nvkm_devidx); int nvkm_top_fault_id(struct nvkm_device *, enum nvkm_devidx);
......
...@@ -141,7 +141,7 @@ nvkm_falcon_oneinit(struct nvkm_falcon *falcon) ...@@ -141,7 +141,7 @@ nvkm_falcon_oneinit(struct nvkm_falcon *falcon)
u32 reg; u32 reg;
if (!falcon->addr) { if (!falcon->addr) {
falcon->addr = nvkm_top_addr(subdev->device, subdev->index); falcon->addr = nvkm_top_addr(subdev->device, subdev->type, subdev->inst);
if (WARN_ON(!falcon->addr)) if (WARN_ON(!falcon->addr))
return -ENODEV; return -ENODEV;
} }
......
...@@ -43,14 +43,14 @@ nvkm_top_device_new(struct nvkm_top *top) ...@@ -43,14 +43,14 @@ nvkm_top_device_new(struct nvkm_top *top)
} }
u32 u32
nvkm_top_addr(struct nvkm_device *device, enum nvkm_devidx index) nvkm_top_addr(struct nvkm_device *device, enum nvkm_subdev_type type, int inst)
{ {
struct nvkm_top *top = device->top; struct nvkm_top *top = device->top;
struct nvkm_top_device *info; struct nvkm_top_device *info;
if (top) { if (top) {
list_for_each_entry(info, &top->device, head) { list_for_each_entry(info, &top->device, head) {
if (info->index == index) if (info->type == type && info->inst == inst)
return info->addr; return info->addr;
} }
} }
......
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