1 #ifndef __NVKM_GRCTX_NVC0_H__
2 #define __NVKM_GRCTX_NVC0_H__
7 struct nvc0_graph_priv
*priv
;
8 struct nvc0_graph_data
*data
;
9 struct nvc0_graph_mmio
*mmio
;
15 int nvc0_grctx_mmio_data(struct nvc0_grctx
*, u32 size
, u32 align
, u32 access
);
16 void nvc0_grctx_mmio_item(struct nvc0_grctx
*, u32 addr
, u32 data
, int s
, int);
18 #define mmio_data(a,b,c) nvc0_grctx_mmio_data(info, (a), (b), (c))
19 #define mmio_list(a,b,c,d) nvc0_grctx_mmio_item(info, (a), (b), (c), (d))
21 #define mmio_vram(a,b,c,d) nvc0_grctx_mmio_data((a), (b), (c), (d))
22 #define mmio_refn(a,b,c,d,e) nvc0_grctx_mmio_item((a), (b), (c), (d), (e))
23 #define mmio_skip(a,b,c) mmio_refn((a), (b), (c), -1, -1)
24 #define mmio_wr32(a,b,c) mmio_refn((a), (b), (c), 0, -1)
26 struct nvc0_grctx_oclass
{
27 struct nouveau_oclass base
;
28 /* main context generation function */
29 void (*main
)(struct nvc0_graph_priv
*, struct nvc0_grctx
*);
30 /* context-specific modify-on-first-load list generation function */
31 void (*mods
)(struct nvc0_graph_priv
*, struct nvc0_grctx
*);
32 void (*unkn
)(struct nvc0_graph_priv
*);
33 /* mmio context data */
34 const struct nvc0_graph_pack
*hub
;
35 const struct nvc0_graph_pack
*gpc
;
36 const struct nvc0_graph_pack
*zcull
;
37 const struct nvc0_graph_pack
*tpc
;
38 const struct nvc0_graph_pack
*ppc
;
39 /* indirect context data, generated with icmds/mthds */
40 const struct nvc0_graph_pack
*icmd
;
41 const struct nvc0_graph_pack
*mthd
;
44 extern struct nouveau_oclass
*nvc0_grctx_oclass
;
45 int nvc0_grctx_generate(struct nvc0_graph_priv
*);
46 void nvc0_grctx_generate_main(struct nvc0_graph_priv
*, struct nvc0_grctx
*);
47 void nvc0_grctx_generate_mods(struct nvc0_graph_priv
*, struct nvc0_grctx
*);
48 void nvc0_grctx_generate_unkn(struct nvc0_graph_priv
*);
49 void nvc0_grctx_generate_tpcid(struct nvc0_graph_priv
*);
50 void nvc0_grctx_generate_r406028(struct nvc0_graph_priv
*);
51 void nvc0_grctx_generate_r4060a8(struct nvc0_graph_priv
*);
52 void nvc0_grctx_generate_r418bb8(struct nvc0_graph_priv
*);
53 void nvc0_grctx_generate_r406800(struct nvc0_graph_priv
*);
55 extern struct nouveau_oclass
*nvc1_grctx_oclass
;
56 void nvc1_grctx_generate_mods(struct nvc0_graph_priv
*, struct nvc0_grctx
*);
57 void nvc1_grctx_generate_unkn(struct nvc0_graph_priv
*);
59 extern struct nouveau_oclass
*nvc4_grctx_oclass
;
60 extern struct nouveau_oclass
*nvc8_grctx_oclass
;
61 extern struct nouveau_oclass
*nvd7_grctx_oclass
;
62 extern struct nouveau_oclass
*nvd9_grctx_oclass
;
64 extern struct nouveau_oclass
*nve4_grctx_oclass
;
65 extern struct nouveau_oclass
*gk20a_grctx_oclass
;
66 void nve4_grctx_generate_main(struct nvc0_graph_priv
*, struct nvc0_grctx
*);
67 void nve4_grctx_generate_mods(struct nvc0_graph_priv
*, struct nvc0_grctx
*);
68 void nve4_grctx_generate_unkn(struct nvc0_graph_priv
*);
69 void nve4_grctx_generate_r418bb8(struct nvc0_graph_priv
*);
71 void nvf0_grctx_generate_mods(struct nvc0_graph_priv
*, struct nvc0_grctx
*);
73 extern struct nouveau_oclass
*nvf0_grctx_oclass
;
74 extern struct nouveau_oclass
*gk110b_grctx_oclass
;
75 extern struct nouveau_oclass
*nv108_grctx_oclass
;
76 extern struct nouveau_oclass
*gm107_grctx_oclass
;
78 /* context init value lists */
80 extern const struct nvc0_graph_pack nvc0_grctx_pack_icmd
[];
82 extern const struct nvc0_graph_pack nvc0_grctx_pack_mthd
[];
83 extern const struct nvc0_graph_init nvc0_grctx_init_902d_0
[];
84 extern const struct nvc0_graph_init nvc0_grctx_init_9039_0
[];
85 extern const struct nvc0_graph_init nvc0_grctx_init_90c0_0
[];
87 extern const struct nvc0_graph_pack nvc0_grctx_pack_hub
[];
88 extern const struct nvc0_graph_init nvc0_grctx_init_main_0
[];
89 extern const struct nvc0_graph_init nvc0_grctx_init_fe_0
[];
90 extern const struct nvc0_graph_init nvc0_grctx_init_pri_0
[];
91 extern const struct nvc0_graph_init nvc0_grctx_init_memfmt_0
[];
92 extern const struct nvc0_graph_init nvc0_grctx_init_rstr2d_0
[];
93 extern const struct nvc0_graph_init nvc0_grctx_init_scc_0
[];
95 extern const struct nvc0_graph_pack nvc0_grctx_pack_gpc
[];
96 extern const struct nvc0_graph_init nvc0_grctx_init_gpc_unk_0
[];
97 extern const struct nvc0_graph_init nvc0_grctx_init_prop_0
[];
98 extern const struct nvc0_graph_init nvc0_grctx_init_gpc_unk_1
[];
99 extern const struct nvc0_graph_init nvc0_grctx_init_zcull_0
[];
100 extern const struct nvc0_graph_init nvc0_grctx_init_crstr_0
[];
101 extern const struct nvc0_graph_init nvc0_grctx_init_gpm_0
[];
102 extern const struct nvc0_graph_init nvc0_grctx_init_gcc_0
[];
104 extern const struct nvc0_graph_pack nvc0_grctx_pack_zcull
[];
106 extern const struct nvc0_graph_pack nvc0_grctx_pack_tpc
[];
107 extern const struct nvc0_graph_init nvc0_grctx_init_pe_0
[];
108 extern const struct nvc0_graph_init nvc0_grctx_init_wwdx_0
[];
109 extern const struct nvc0_graph_init nvc0_grctx_init_mpc_0
[];
110 extern const struct nvc0_graph_init nvc0_grctx_init_tpccs_0
[];
112 extern const struct nvc0_graph_init nvc4_grctx_init_tex_0
[];
113 extern const struct nvc0_graph_init nvc4_grctx_init_l1c_0
[];
114 extern const struct nvc0_graph_init nvc4_grctx_init_sm_0
[];
116 extern const struct nvc0_graph_init nvc1_grctx_init_9097_0
[];
118 extern const struct nvc0_graph_init nvc1_grctx_init_gpm_0
[];
120 extern const struct nvc0_graph_init nvc1_grctx_init_pe_0
[];
121 extern const struct nvc0_graph_init nvc1_grctx_init_wwdx_0
[];
122 extern const struct nvc0_graph_init nvc1_grctx_init_tpccs_0
[];
124 extern const struct nvc0_graph_init nvc8_grctx_init_9197_0
[];
125 extern const struct nvc0_graph_init nvc8_grctx_init_9297_0
[];
127 extern const struct nvc0_graph_pack nvd9_grctx_pack_icmd
[];
129 extern const struct nvc0_graph_pack nvd9_grctx_pack_mthd
[];
131 extern const struct nvc0_graph_init nvd9_grctx_init_fe_0
[];
132 extern const struct nvc0_graph_init nvd9_grctx_init_be_0
[];
134 extern const struct nvc0_graph_init nvd9_grctx_init_prop_0
[];
135 extern const struct nvc0_graph_init nvd9_grctx_init_gpc_unk_1
[];
136 extern const struct nvc0_graph_init nvd9_grctx_init_crstr_0
[];
138 extern const struct nvc0_graph_init nvd9_grctx_init_sm_0
[];
140 extern const struct nvc0_graph_init nvd7_grctx_init_pe_0
[];
142 extern const struct nvc0_graph_init nvd7_grctx_init_wwdx_0
[];
144 extern const struct nvc0_graph_init nve4_grctx_init_memfmt_0
[];
145 extern const struct nvc0_graph_init nve4_grctx_init_ds_0
[];
146 extern const struct nvc0_graph_init nve4_grctx_init_scc_0
[];
148 extern const struct nvc0_graph_init nve4_grctx_init_gpm_0
[];
150 extern const struct nvc0_graph_init nve4_grctx_init_pes_0
[];
152 extern const struct nvc0_graph_pack nve4_grctx_pack_hub
[];
153 extern const struct nvc0_graph_pack nve4_grctx_pack_gpc
[];
154 extern const struct nvc0_graph_pack nve4_grctx_pack_tpc
[];
155 extern const struct nvc0_graph_pack nve4_grctx_pack_ppc
[];
156 extern const struct nvc0_graph_pack nve4_grctx_pack_icmd
[];
157 extern const struct nvc0_graph_init nve4_grctx_init_a097_0
[];
159 extern const struct nvc0_graph_pack nvf0_grctx_pack_icmd
[];
161 extern const struct nvc0_graph_pack nvf0_grctx_pack_mthd
[];
163 extern const struct nvc0_graph_pack nvf0_grctx_pack_hub
[];
164 extern const struct nvc0_graph_init nvf0_grctx_init_pri_0
[];
165 extern const struct nvc0_graph_init nvf0_grctx_init_cwd_0
[];
167 extern const struct nvc0_graph_pack nvf0_grctx_pack_gpc
[];
168 extern const struct nvc0_graph_init nvf0_grctx_init_gpc_unk_2
[];
170 extern const struct nvc0_graph_init nvf0_grctx_init_tex_0
[];
171 extern const struct nvc0_graph_init nvf0_grctx_init_mpc_0
[];
172 extern const struct nvc0_graph_init nvf0_grctx_init_l1c_0
[];
174 extern const struct nvc0_graph_pack nvf0_grctx_pack_ppc
[];
176 extern const struct nvc0_graph_init nv108_grctx_init_rstr2d_0
[];
178 extern const struct nvc0_graph_init nv108_grctx_init_prop_0
[];
179 extern const struct nvc0_graph_init nv108_grctx_init_crstr_0
[];