xref: /linux/drivers/gpu/drm/nouveau/nvkm/engine/sw/nv50.h (revision 2ba9268dd603d23e17643437b2246acb6844953b)
1 #ifndef __NVKM_SW_NV50_H__
2 #define __NVKM_SW_NV50_H__
3 #include <engine/sw.h>
4 #include <core/notify.h>
5 
6 struct nv50_sw_oclass {
7 	struct nvkm_oclass base;
8 	struct nvkm_oclass *cclass;
9 	struct nvkm_oclass *sclass;
10 };
11 
12 struct nv50_sw_priv {
13 	struct nvkm_sw base;
14 };
15 
16 int  nv50_sw_ctor(struct nvkm_object *, struct nvkm_object *,
17 			struct nvkm_oclass *, void *, u32,
18 			struct nvkm_object **);
19 
20 struct nv50_sw_cclass {
21 	struct nvkm_oclass base;
22 	int (*vblank)(struct nvkm_notify *);
23 };
24 
25 struct nv50_sw_chan {
26 	struct nvkm_sw_chan base;
27 	struct {
28 		struct nvkm_notify notify[4];
29 		u32 channel;
30 		u32 ctxdma;
31 		u64 offset;
32 		u32 value;
33 	} vblank;
34 };
35 
36 int  nv50_sw_context_ctor(struct nvkm_object *,
37 				struct nvkm_object *,
38 				struct nvkm_oclass *, void *, u32,
39 				struct nvkm_object **);
40 void nv50_sw_context_dtor(struct nvkm_object *);
41 
42 int nv50_sw_mthd_vblsem_value(struct nvkm_object *, u32, void *, u32);
43 int nv50_sw_mthd_vblsem_release(struct nvkm_object *, u32, void *, u32);
44 int nv50_sw_mthd_flip(struct nvkm_object *, u32, void *, u32);
45 #endif
46