summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/subdev/top
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2016-05-30 10:36:02 +1000
committerBen Skeggs <bskeggs@redhat.com>2016-07-14 11:53:25 +1000
commit3560e1703f4f7605da203561bad0e231706b93bd (patch)
tree5a218d1bde275cce1c4715f3a226e1955fc4b8e0 /drivers/gpu/drm/nouveau/nvkm/subdev/top
parent952eb819e3234b9deceb3287398f0c2a272e4760 (diff)
downloadlinux-3560e1703f4f7605da203561bad0e231706b93bd.tar.bz2
drm/nouveau/top: add function to lookup interrupt mask for a given device
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/subdev/top')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c16
1 files changed, 16 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 19fbcfdb08e8..fe063d5728e2 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/top/base.c
@@ -57,6 +57,22 @@ nvkm_top_reset(struct nvkm_device *device, enum nvkm_devidx index)
}
u32
+nvkm_top_intr_mask(struct nvkm_device *device, enum nvkm_devidx devidx)
+{
+ struct nvkm_top *top = device->top;
+ struct nvkm_top_device *info;
+
+ if (top) {
+ list_for_each_entry(info, &top->device, head) {
+ if (info->index == devidx && info->intr >= 0)
+ return BIT(info->intr);
+ }
+ }
+
+ return 0;
+}
+
+u32
nvkm_top_intr(struct nvkm_device *device, u32 intr, u64 *psubdevs)
{
struct nvkm_top *top = device->top;