xref: /linux/drivers/gpu/drm/nouveau/include/nvkm/engine/sec2.h (revision c532de5a67a70f8533d495f8f2aaa9a0491c3ad0)
1 /* SPDX-License-Identifier: MIT */
2 #ifndef __NVKM_SEC2_H__
3 #define __NVKM_SEC2_H__
4 #define nvkm_sec2(p) container_of((p), struct nvkm_sec2, engine)
5 #include <core/engine.h>
6 #include <core/falcon.h>
7 
8 struct nvkm_sec2 {
9 	const struct nvkm_sec2_func *func;
10 	struct nvkm_engine engine;
11 	struct nvkm_falcon falcon;
12 
13 	atomic_t running;
14 	atomic_t initmsg;
15 
16 	struct nvkm_falcon_qmgr *qmgr;
17 	struct nvkm_falcon_cmdq *cmdq;
18 	struct nvkm_falcon_msgq *msgq;
19 
20 	struct work_struct work;
21 };
22 
23 int gp102_sec2_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_sec2 **);
24 int gp108_sec2_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_sec2 **);
25 int tu102_sec2_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_sec2 **);
26 int ga102_sec2_new(struct nvkm_device *, enum nvkm_subdev_type, int inst, struct nvkm_sec2 **);
27 #endif
28