aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
index fe063d5728e2..67ada1d9a28c 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
@@ -95,6 +95,20 @@ nvkm_top_intr(struct nvkm_device *device, u32 intr, u64 *psubdevs)
95 return intr & ~handled; 95 return intr & ~handled;
96} 96}
97 97
98int
99nvkm_top_fault_id(struct nvkm_device *device, enum nvkm_devidx devidx)
100{
101 struct nvkm_top *top = device->top;
102 struct nvkm_top_device *info;
103
104 list_for_each_entry(info, &top->device, head) {
105 if (info->index == devidx && info->fault >= 0)
106 return info->fault;
107 }
108
109 return -ENOENT;
110}
111
98enum nvkm_devidx 112enum nvkm_devidx
99nvkm_top_fault(struct nvkm_device *device, int fault) 113nvkm_top_fault(struct nvkm_device *device, int fault)
100{ 114{