aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2018-05-08 20:39:46 +1000
committerBen Skeggs <bskeggs@redhat.com>2018-05-18 15:01:21 +1000
commitc5c9127b25b2946369877d16b3c208cf54d4bf54 (patch)
tree076d07e3f9defef3378c00feddd478923c168fc4 /drivers/gpu/drm/nouveau/nvkm/core/subdev.c
parentdrm/nouveau/disp/nv50-: pass nvkm_memory objects for channel push buffers (diff)
downloadlinux-dev-c5c9127b25b2946369877d16b3c208cf54d4bf54.tar.xz
linux-dev-c5c9127b25b2946369877d16b3c208cf54d4bf54.zip
drm/nouveau/device: implement a generic method to query device-specific properties
We have a need to fetch data from GPU-specific sub-devices that is not tied to any particular engine object. This commit provides the framework to support such queries. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nvkm/core/subdev.c')
-rw-r--r--drivers/gpu/drm/nouveau/nvkm/core/subdev.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
index c707306ac286..b96f9e2f237a 100644
--- a/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
+++ b/drivers/gpu/drm/nouveau/nvkm/core/subdev.c
@@ -93,6 +93,14 @@ nvkm_subdev_intr(struct nvkm_subdev *subdev)
}
int
+nvkm_subdev_info(struct nvkm_subdev *subdev, u64 mthd, u64 *data)
+{
+ if (subdev->func->info)
+ return subdev->func->info(subdev, mthd, data);
+ return -ENOSYS;
+}
+
+int
nvkm_subdev_fini(struct nvkm_subdev *subdev, bool suspend)
{
struct nvkm_device *device = subdev->device;