#ifndef __NVKM_GSP_H__ #define __NVKM_GSP_H__ #define nvkm_gsp(p) … #include <core/subdev.h> #include <core/falcon.h> #include <core/firmware.h> #define GSP_PAGE_SHIFT … #define GSP_PAGE_SIZE … struct nvkm_gsp_mem { … }; struct nvkm_gsp_radix3 { … }; int nvkm_gsp_sg(struct nvkm_device *, u64 size, struct sg_table *); void nvkm_gsp_sg_free(struct nvkm_device *, struct sg_table *); nvkm_gsp_msg_ntfy_func; struct nvkm_gsp_event; nvkm_gsp_event_func; struct nvkm_gsp { … }; static inline bool nvkm_gsp_rm(struct nvkm_gsp *gsp) { … } static inline void * nvkm_gsp_rpc_get(struct nvkm_gsp *gsp, u32 fn, u32 argc) { … } static inline void * nvkm_gsp_rpc_push(struct nvkm_gsp *gsp, void *argv, bool wait, u32 repc) { … } static inline void * nvkm_gsp_rpc_rd(struct nvkm_gsp *gsp, u32 fn, u32 argc) { … } static inline int nvkm_gsp_rpc_wr(struct nvkm_gsp *gsp, void *argv, bool wait) { … } static inline void nvkm_gsp_rpc_done(struct nvkm_gsp *gsp, void *repv) { … } static inline void * nvkm_gsp_rm_ctrl_get(struct nvkm_gsp_object *object, u32 cmd, u32 argc) { … } static inline int nvkm_gsp_rm_ctrl_push(struct nvkm_gsp_object *object, void *argv, u32 repc) { … } static inline void * nvkm_gsp_rm_ctrl_rd(struct nvkm_gsp_object *object, u32 cmd, u32 repc) { … } static inline int nvkm_gsp_rm_ctrl_wr(struct nvkm_gsp_object *object, void *argv) { … } static inline void nvkm_gsp_rm_ctrl_done(struct nvkm_gsp_object *object, void *repv) { … } static inline void * nvkm_gsp_rm_alloc_get(struct nvkm_gsp_object *parent, u32 handle, u32 oclass, u32 argc, struct nvkm_gsp_object *object) { … } static inline void * nvkm_gsp_rm_alloc_push(struct nvkm_gsp_object *object, void *argv, u32 repc) { … } static inline int nvkm_gsp_rm_alloc_wr(struct nvkm_gsp_object *object, void *argv) { … } static inline void nvkm_gsp_rm_alloc_done(struct nvkm_gsp_object *object, void *repv) { … } static inline int nvkm_gsp_rm_alloc(struct nvkm_gsp_object *parent, u32 handle, u32 oclass, u32 argc, struct nvkm_gsp_object *object) { … } static inline int nvkm_gsp_rm_free(struct nvkm_gsp_object *object) { … } static inline int nvkm_gsp_client_ctor(struct nvkm_gsp *gsp, struct nvkm_gsp_client *client) { … } static inline void nvkm_gsp_client_dtor(struct nvkm_gsp_client *client) { … } static inline int nvkm_gsp_device_ctor(struct nvkm_gsp_client *client, struct nvkm_gsp_device *device) { … } static inline void nvkm_gsp_device_dtor(struct nvkm_gsp_device *device) { … } static inline int nvkm_gsp_client_device_ctor(struct nvkm_gsp *gsp, struct nvkm_gsp_client *client, struct nvkm_gsp_device *device) { … } struct nvkm_gsp_event { … }; static inline int nvkm_gsp_device_event_ctor(struct nvkm_gsp_device *device, u32 handle, u32 id, nvkm_gsp_event_func func, struct nvkm_gsp_event *event) { … } static inline void nvkm_gsp_event_dtor(struct nvkm_gsp_event *event) { … } int nvkm_gsp_intr_stall(struct nvkm_gsp *, enum nvkm_subdev_type, int); int nvkm_gsp_intr_nonstall(struct nvkm_gsp *, enum nvkm_subdev_type, int); int gv100_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **); int tu102_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **); int tu116_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **); int ga100_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **); int ga102_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **); int ad102_gsp_new(struct nvkm_device *, enum nvkm_subdev_type, int, struct nvkm_gsp **); #endif