Commit eec9ffe4 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/top: add function to lookup PRI address for devices

Will be using this in upcoming changes to avoid the need for entirely
new subdevs to deal with Turing register moves.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 78cdadb8
...@@ -9,6 +9,7 @@ struct nvkm_top { ...@@ -9,6 +9,7 @@ struct nvkm_top {
struct list_head device; struct list_head device;
}; };
u32 nvkm_top_addr(struct nvkm_device *, enum nvkm_devidx);
u32 nvkm_top_reset(struct nvkm_device *, enum nvkm_devidx); u32 nvkm_top_reset(struct nvkm_device *, enum nvkm_devidx);
u32 nvkm_top_intr(struct nvkm_device *, u32 intr, u64 *subdevs); u32 nvkm_top_intr(struct nvkm_device *, u32 intr, u64 *subdevs);
u32 nvkm_top_intr_mask(struct nvkm_device *, enum nvkm_devidx); u32 nvkm_top_intr_mask(struct nvkm_device *, enum nvkm_devidx);
......
...@@ -40,6 +40,22 @@ nvkm_top_device_new(struct nvkm_top *top) ...@@ -40,6 +40,22 @@ nvkm_top_device_new(struct nvkm_top *top)
return info; return info;
} }
u32
nvkm_top_addr(struct nvkm_device *device, enum nvkm_devidx index)
{
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)
return info->addr;
}
}
return 0;
}
u32 u32
nvkm_top_reset(struct nvkm_device *device, enum nvkm_devidx index) nvkm_top_reset(struct nvkm_device *device, enum nvkm_devidx index)
{ {
......
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