1 #ifndef __NVKM_GRCTX_NVC0_H__
2 #define __NVKM_GRCTX_NVC0_H__
6 struct gf100_gr_priv
*priv
;
7 struct gf100_gr_data
*data
;
8 struct gf100_gr_mmio
*mmio
;
14 int gf100_grctx_mmio_data(struct gf100_grctx
*, u32 size
, u32 align
, u32 access
);
15 void gf100_grctx_mmio_item(struct gf100_grctx
*, u32 addr
, u32 data
, int s
, int);
17 #define mmio_vram(a,b,c,d) gf100_grctx_mmio_data((a), (b), (c), (d))
18 #define mmio_refn(a,b,c,d,e) gf100_grctx_mmio_item((a), (b), (c), (d), (e))
19 #define mmio_skip(a,b,c) mmio_refn((a), (b), (c), -1, -1)
20 #define mmio_wr32(a,b,c) mmio_refn((a), (b), (c), 0, -1)
22 struct gf100_grctx_oclass
{
23 struct nvkm_oclass base
;
24 /* main context generation function */
25 void (*main
)(struct gf100_gr_priv
*, struct gf100_grctx
*);
26 /* context-specific modify-on-first-load list generation function */
27 void (*unkn
)(struct gf100_gr_priv
*);
28 /* mmio context data */
29 const struct gf100_gr_pack
*hub
;
30 const struct gf100_gr_pack
*gpc
;
31 const struct gf100_gr_pack
*zcull
;
32 const struct gf100_gr_pack
*tpc
;
33 const struct gf100_gr_pack
*ppc
;
34 /* indirect context data, generated with icmds/mthds */
35 const struct gf100_gr_pack
*icmd
;
36 const struct gf100_gr_pack
*mthd
;
37 /* bundle circular buffer */
38 void (*bundle
)(struct gf100_grctx
*);
40 u32 bundle_min_gpm_fifo_depth
;
41 u32 bundle_token_limit
;
43 void (*pagepool
)(struct gf100_grctx
*);
45 /* attribute(/alpha) circular buffer */
46 void (*attrib
)(struct gf100_grctx
*);
53 static inline const struct gf100_grctx_oclass
*
54 gf100_grctx_impl(struct gf100_gr_priv
*priv
)
56 return (void *)nv_engine(priv
)->cclass
;
59 extern struct nvkm_oclass
*gf100_grctx_oclass
;
60 int gf100_grctx_generate(struct gf100_gr_priv
*);
61 void gf100_grctx_generate_main(struct gf100_gr_priv
*, struct gf100_grctx
*);
62 void gf100_grctx_generate_bundle(struct gf100_grctx
*);
63 void gf100_grctx_generate_pagepool(struct gf100_grctx
*);
64 void gf100_grctx_generate_attrib(struct gf100_grctx
*);
65 void gf100_grctx_generate_unkn(struct gf100_gr_priv
*);
66 void gf100_grctx_generate_tpcid(struct gf100_gr_priv
*);
67 void gf100_grctx_generate_r406028(struct gf100_gr_priv
*);
68 void gf100_grctx_generate_r4060a8(struct gf100_gr_priv
*);
69 void gf100_grctx_generate_r418bb8(struct gf100_gr_priv
*);
70 void gf100_grctx_generate_r406800(struct gf100_gr_priv
*);
72 extern struct nvkm_oclass
*gf108_grctx_oclass
;
73 void gf108_grctx_generate_attrib(struct gf100_grctx
*);
74 void gf108_grctx_generate_unkn(struct gf100_gr_priv
*);
76 extern struct nvkm_oclass
*gf104_grctx_oclass
;
77 extern struct nvkm_oclass
*gf110_grctx_oclass
;
79 extern struct nvkm_oclass
*gf117_grctx_oclass
;
80 void gf117_grctx_generate_attrib(struct gf100_grctx
*);
82 extern struct nvkm_oclass
*gf119_grctx_oclass
;
84 extern struct nvkm_oclass
*gk104_grctx_oclass
;
85 extern struct nvkm_oclass
*gk20a_grctx_oclass
;
86 void gk104_grctx_generate_main(struct gf100_gr_priv
*, struct gf100_grctx
*);
87 void gk104_grctx_generate_bundle(struct gf100_grctx
*);
88 void gk104_grctx_generate_pagepool(struct gf100_grctx
*);
89 void gk104_grctx_generate_unkn(struct gf100_gr_priv
*);
90 void gk104_grctx_generate_r418bb8(struct gf100_gr_priv
*);
91 void gk104_grctx_generate_rop_active_fbps(struct gf100_gr_priv
*);
94 void gm107_grctx_generate_bundle(struct gf100_grctx
*);
95 void gm107_grctx_generate_pagepool(struct gf100_grctx
*);
96 void gm107_grctx_generate_attrib(struct gf100_grctx
*);
98 extern struct nvkm_oclass
*gk110_grctx_oclass
;
99 extern struct nvkm_oclass
*gk110b_grctx_oclass
;
100 extern struct nvkm_oclass
*gk208_grctx_oclass
;
102 extern struct nvkm_oclass
*gm107_grctx_oclass
;
103 void gm107_grctx_generate_bundle(struct gf100_grctx
*);
104 void gm107_grctx_generate_pagepool(struct gf100_grctx
*);
105 void gm107_grctx_generate_attrib(struct gf100_grctx
*);
107 extern struct nvkm_oclass
*gm204_grctx_oclass
;
108 void gm204_grctx_generate_main(struct gf100_gr_priv
*, struct gf100_grctx
*);
109 void gm204_grctx_generate_tpcid(struct gf100_gr_priv
*);
110 void gm204_grctx_generate_405b60(struct gf100_gr_priv
*);
112 extern struct nvkm_oclass
*gm206_grctx_oclass
;
113 extern struct nvkm_oclass
*gm20b_grctx_oclass
;
115 /* context init value lists */
117 extern const struct gf100_gr_pack gf100_grctx_pack_icmd
[];
119 extern const struct gf100_gr_pack gf100_grctx_pack_mthd
[];
120 extern const struct gf100_gr_init gf100_grctx_init_902d_0
[];
121 extern const struct gf100_gr_init gf100_grctx_init_9039_0
[];
122 extern const struct gf100_gr_init gf100_grctx_init_90c0_0
[];
124 extern const struct gf100_gr_pack gf100_grctx_pack_hub
[];
125 extern const struct gf100_gr_init gf100_grctx_init_main_0
[];
126 extern const struct gf100_gr_init gf100_grctx_init_fe_0
[];
127 extern const struct gf100_gr_init gf100_grctx_init_pri_0
[];
128 extern const struct gf100_gr_init gf100_grctx_init_memfmt_0
[];
129 extern const struct gf100_gr_init gf100_grctx_init_rstr2d_0
[];
130 extern const struct gf100_gr_init gf100_grctx_init_scc_0
[];
132 extern const struct gf100_gr_pack gf100_grctx_pack_gpc
[];
133 extern const struct gf100_gr_init gf100_grctx_init_gpc_unk_0
[];
134 extern const struct gf100_gr_init gf100_grctx_init_prop_0
[];
135 extern const struct gf100_gr_init gf100_grctx_init_gpc_unk_1
[];
136 extern const struct gf100_gr_init gf100_grctx_init_zcull_0
[];
137 extern const struct gf100_gr_init gf100_grctx_init_crstr_0
[];
138 extern const struct gf100_gr_init gf100_grctx_init_gpm_0
[];
139 extern const struct gf100_gr_init gf100_grctx_init_gcc_0
[];
141 extern const struct gf100_gr_pack gf100_grctx_pack_zcull
[];
143 extern const struct gf100_gr_pack gf100_grctx_pack_tpc
[];
144 extern const struct gf100_gr_init gf100_grctx_init_pe_0
[];
145 extern const struct gf100_gr_init gf100_grctx_init_wwdx_0
[];
146 extern const struct gf100_gr_init gf100_grctx_init_mpc_0
[];
147 extern const struct gf100_gr_init gf100_grctx_init_tpccs_0
[];
149 extern const struct gf100_gr_init gf104_grctx_init_tex_0
[];
150 extern const struct gf100_gr_init gf104_grctx_init_l1c_0
[];
151 extern const struct gf100_gr_init gf104_grctx_init_sm_0
[];
153 extern const struct gf100_gr_init gf108_grctx_init_9097_0
[];
155 extern const struct gf100_gr_init gf108_grctx_init_gpm_0
[];
157 extern const struct gf100_gr_init gf108_grctx_init_pe_0
[];
158 extern const struct gf100_gr_init gf108_grctx_init_wwdx_0
[];
159 extern const struct gf100_gr_init gf108_grctx_init_tpccs_0
[];
161 extern const struct gf100_gr_init gf110_grctx_init_9197_0
[];
162 extern const struct gf100_gr_init gf110_grctx_init_9297_0
[];
164 extern const struct gf100_gr_pack gf119_grctx_pack_icmd
[];
166 extern const struct gf100_gr_pack gf119_grctx_pack_mthd
[];
168 extern const struct gf100_gr_init gf119_grctx_init_fe_0
[];
169 extern const struct gf100_gr_init gf119_grctx_init_be_0
[];
171 extern const struct gf100_gr_init gf119_grctx_init_prop_0
[];
172 extern const struct gf100_gr_init gf119_grctx_init_gpc_unk_1
[];
173 extern const struct gf100_gr_init gf119_grctx_init_crstr_0
[];
175 extern const struct gf100_gr_init gf119_grctx_init_sm_0
[];
177 extern const struct gf100_gr_init gf117_grctx_init_pe_0
[];
179 extern const struct gf100_gr_init gf117_grctx_init_wwdx_0
[];
181 extern const struct gf100_gr_init gk104_grctx_init_memfmt_0
[];
182 extern const struct gf100_gr_init gk104_grctx_init_ds_0
[];
183 extern const struct gf100_gr_init gk104_grctx_init_scc_0
[];
185 extern const struct gf100_gr_init gk104_grctx_init_gpm_0
[];
187 extern const struct gf100_gr_init gk104_grctx_init_pes_0
[];
189 extern const struct gf100_gr_pack gk104_grctx_pack_hub
[];
190 extern const struct gf100_gr_pack gk104_grctx_pack_gpc
[];
191 extern const struct gf100_gr_pack gk104_grctx_pack_tpc
[];
192 extern const struct gf100_gr_pack gk104_grctx_pack_ppc
[];
193 extern const struct gf100_gr_pack gk104_grctx_pack_icmd
[];
194 extern const struct gf100_gr_init gk104_grctx_init_a097_0
[];
196 extern const struct gf100_gr_pack gk110_grctx_pack_icmd
[];
198 extern const struct gf100_gr_pack gk110_grctx_pack_mthd
[];
200 extern const struct gf100_gr_pack gk110_grctx_pack_hub
[];
201 extern const struct gf100_gr_init gk110_grctx_init_pri_0
[];
202 extern const struct gf100_gr_init gk110_grctx_init_cwd_0
[];
204 extern const struct gf100_gr_pack gk110_grctx_pack_gpc
[];
205 extern const struct gf100_gr_init gk110_grctx_init_gpc_unk_2
[];
207 extern const struct gf100_gr_init gk110_grctx_init_tex_0
[];
208 extern const struct gf100_gr_init gk110_grctx_init_mpc_0
[];
209 extern const struct gf100_gr_init gk110_grctx_init_l1c_0
[];
211 extern const struct gf100_gr_pack gk110_grctx_pack_ppc
[];
213 extern const struct gf100_gr_init gk208_grctx_init_rstr2d_0
[];
215 extern const struct gf100_gr_init gk208_grctx_init_prop_0
[];
216 extern const struct gf100_gr_init gk208_grctx_init_crstr_0
[];
218 extern const struct gf100_gr_init gm107_grctx_init_gpc_unk_0
[];
219 extern const struct gf100_gr_init gm107_grctx_init_wwdx_0
[];
221 extern const struct gf100_gr_pack gm204_grctx_pack_icmd
[];
223 extern const struct gf100_gr_pack gm204_grctx_pack_mthd
[];
225 extern const struct gf100_gr_pack gm204_grctx_pack_hub
[];
227 extern const struct gf100_gr_init gm204_grctx_init_prop_0
[];
228 extern const struct gf100_gr_init gm204_grctx_init_setup_0
[];
229 extern const struct gf100_gr_init gm204_grctx_init_gpm_0
[];
230 extern const struct gf100_gr_init gm204_grctx_init_gpc_unk_2
[];
232 extern const struct gf100_gr_pack gm204_grctx_pack_tpc
[];
234 extern const struct gf100_gr_pack gm204_grctx_pack_ppc
[];