drm/nouveau/top: expose parsed device info more directly
authorBen Skeggs <bskeggs@redhat.com>
Sun, 6 Dec 2020 22:54:34 +0000 (08:54 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 11 Feb 2021 01:49:53 +0000 (11:49 +1000)
This is easier to deal with in some situations than the existing accessor
functions.

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h
drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h

index 7be0e7e7bd77fa7c16d91774d2c3c29f3073ed9f..cf3c4fd8942d261fe76d7f0e04b51d6b623b447d 100644 (file)
@@ -9,6 +9,19 @@ struct nvkm_top {
        struct list_head device;
 };
 
+struct nvkm_top_device {
+       enum nvkm_subdev_type type;
+       int inst;
+       enum nvkm_devidx index;
+       u32 addr;
+       int fault;
+       int engine;
+       int runlist;
+       int reset;
+       int intr;
+       struct list_head head;
+};
+
 u32 nvkm_top_addr(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);
index 85c9f1411012fe3c98f6a1e86a612e0420b29537..37187691bfb41a2a990ce3cf79f43a1d3239c19f 100644 (file)
@@ -11,18 +11,5 @@ struct nvkm_top_func {
 int nvkm_top_new_(const struct nvkm_top_func *, struct nvkm_device *,
                  int, struct nvkm_top **);
 
-struct nvkm_top_device {
-       enum nvkm_subdev_type type;
-       int inst;
-       enum nvkm_devidx index;
-       u32 addr;
-       int fault;
-       int engine;
-       int runlist;
-       int reset;
-       int intr;
-       struct list_head head;
-};
-
 struct nvkm_top_device *nvkm_top_device_new(struct nvkm_top *);
 #endif