From: Ben Skeggs Date: Sun, 6 Dec 2020 22:54:34 +0000 (+1000) Subject: drm/nouveau/top: expose parsed device info more directly X-Git-Tag: baikal/aarch64/sdk6.1~7223^2~3^2~53 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=a156466c7e87bde57c2d6b0966ddfcaf0b42524b;p=kernel.git drm/nouveau/top: expose parsed device info more directly This is easier to deal with in some situations than the existing accessor functions. Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul --- diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h index 7be0e7e7bd77f..cf3c4fd8942d2 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/top.h @@ -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); diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h b/drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h index 85c9f1411012f..37187691bfb41 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/top/priv.h @@ -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