1 /* SPDX-License-Identifier: MIT */ 2 #ifndef __NVKM_TOP_H__ 3 #define __NVKM_TOP_H__ 4 #include <core/subdev.h> 5 6 struct nvkm_top { 7 const struct nvkm_top_func *func; 8 struct nvkm_subdev subdev; 9 struct list_head device; 10 }; 11 12 struct nvkm_top_device { 13 enum nvkm_subdev_type type; 14 int inst; 15 enum nvkm_devidx index; 16 u32 addr; 17 int fault; 18 int engine; 19 int runlist; 20 int reset; 21 int intr; 22 struct list_head head; 23 }; 24 25 u32 nvkm_top_addr(struct nvkm_device *, enum nvkm_subdev_type, int); 26 u32 nvkm_top_reset(struct nvkm_device *, enum nvkm_subdev_type, int); 27 u32 nvkm_top_intr_mask(struct nvkm_device *, enum nvkm_subdev_type, int); 28 int nvkm_top_fault_id(struct nvkm_device *, enum nvkm_devidx); 29 enum nvkm_devidx nvkm_top_fault(struct nvkm_device *, int fault); 30 enum nvkm_devidx nvkm_top_engine(struct nvkm_device *, int, int *runl, int *engn); 31 32 int gk104_top_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_top **); 33 #endif 34