Skip to content

Commit

Permalink
drm/nouveau/falcon: use split type+inst when looking up PRI addr
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
  • Loading branch information
Ben Skeggs committed Feb 11, 2021
1 parent fcc08a7 commit b7da823
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct nvkm_top_device {
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_intr_mask(struct nvkm_device *, enum nvkm_subdev_type, int);
int nvkm_top_fault_id(struct nvkm_device *, enum nvkm_devidx);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpu/drm/nouveau/nvkm/falcon/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ nvkm_falcon_oneinit(struct nvkm_falcon *falcon)
u32 reg;

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))
return -ENODEV;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ nvkm_top_device_new(struct nvkm_top *top)
}

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_device *info;

if (top) {
list_for_each_entry(info, &top->device, head) {
if (info->index == index)
if (info->type == type && info->inst == inst)
return info->addr;
}
}
Expand Down

0 comments on commit b7da823

Please sign in to comment.