2 * Copyright © 2007,2009 Intel Corporation
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21 * DEALINGS IN THE SOFTWARE.
24 * Eric Anholt <eric@anholt.net>
31 #include "intel_chipset.h"
32 #include "intel_reg.h"
35 # define IDCT_DONE (1 << 30)
36 # define IQ_DONE (1 << 29)
37 # define PR_DONE (1 << 28)
38 # define VLD_DONE (1 << 27)
39 # define IP_DONE (1 << 26)
40 # define FBC_DONE (1 << 25)
41 # define BINNER_DONE (1 << 24)
42 # define SF_DONE (1 << 23)
43 # define SE_DONE (1 << 22)
44 # define WM_DONE (1 << 21)
45 # define IZ_DONE (1 << 20)
46 # define PERSPECTIVE_INTERP_DONE (1 << 19)
47 # define DISPATCHER_DONE (1 << 18)
48 # define PROJECTION_DONE (1 << 17)
49 # define DEPENDENT_ADDRESS_DONE (1 << 16)
50 # define QUAD_CACHE_DONE (1 << 15)
51 # define TEXTURE_FETCH_DONE (1 << 14)
52 # define TEXTURE_DECOMPRESS_DONE (1 << 13)
53 # define SAMPLER_CACHE_DONE (1 << 12)
54 # define FILTER_DONE (1 << 11)
55 # define BYPASS_FIFO_DONE (1 << 10)
56 # define PS_DONE (1 << 9)
57 # define CC_DONE (1 << 8)
58 # define MAP_FILTER_DONE (1 << 7)
59 # define MAP_L2_IDLE (1 << 6)
60 # define RING_2_ENABLE (1 << 2)
61 # define RING_1_ENABLE (1 << 1)
62 # define RING_0_ENABLE (1 << 0)
64 # define I830_GMBUS_DONE (1 << 26)
65 # define I830_FBC_DONE (1 << 25)
66 # define I830_BINNER_DONE (1 << 24)
67 # define I830_MPEG_DONE (1 << 23)
68 # define I830_MECO_DONE (1 << 22)
69 # define I830_MCD_DONE (1 << 21)
70 # define I830_MCSTP_DONE (1 << 20)
71 # define I830_CC_DONE (1 << 19)
72 # define I830_DG_DONE (1 << 18)
73 # define I830_DCMP_DONE (1 << 17)
74 # define I830_FTCH_DONE (1 << 16)
75 # define I830_IT_DONE (1 << 15)
76 # define I830_MG_DONE (1 << 14)
77 # define I830_MEC_DONE (1 << 13)
78 # define I830_PC_DONE (1 << 12)
79 # define I830_QCC_DONE (1 << 11)
80 # define I830_TB_DONE (1 << 10)
81 # define I830_WM_DONE (1 << 9)
82 # define I830_EF_DONE (1 << 8)
83 # define I830_BLITTER_DONE (1 << 7)
84 # define I830_MAP_L2_DONE (1 << 6)
85 # define I830_SECONDARY_RING_3_DONE (1 << 5)
86 # define I830_SECONDARY_RING_2_DONE (1 << 4)
87 # define I830_SECONDARY_RING_1_DONE (1 << 3)
88 # define I830_SECONDARY_RING_0_DONE (1 << 2)
89 # define I830_PRIMARY_RING_1_DONE (1 << 1)
90 # define I830_PRIMARY_RING_0_DONE (1 << 0)
93 # define I965_ROW_0_EU_0_DONE (1 << 31)
94 # define I965_ROW_0_EU_1_DONE (1 << 30)
95 # define I965_ROW_0_EU_2_DONE (1 << 29)
96 # define I965_ROW_0_EU_3_DONE (1 << 28)
97 # define I965_ROW_1_EU_0_DONE (1 << 27)
98 # define I965_ROW_1_EU_1_DONE (1 << 26)
99 # define I965_ROW_1_EU_2_DONE (1 << 25)
100 # define I965_ROW_1_EU_3_DONE (1 << 24)
101 # define I965_SF_DONE (1 << 23)
102 # define I965_SE_DONE (1 << 22)
103 # define I965_WM_DONE (1 << 21)
104 # define I965_DISPATCHER_DONE (1 << 18)
105 # define I965_PROJECTION_DONE (1 << 17)
106 # define I965_DG_DONE (1 << 16)
107 # define I965_QUAD_CACHE_DONE (1 << 15)
108 # define I965_TEXTURE_FETCH_DONE (1 << 14)
109 # define I965_TEXTURE_DECOMPRESS_DONE (1 << 13)
110 # define I965_SAMPLER_CACHE_DONE (1 << 12)
111 # define I965_FILTER_DONE (1 << 11)
112 # define I965_BYPASS_DONE (1 << 10)
113 # define I965_PS_DONE (1 << 9)
114 # define I965_CC_DONE (1 << 8)
115 # define I965_MAP_FILTER_DONE (1 << 7)
116 # define I965_MAP_L2_IDLE (1 << 6)
117 # define I965_MA_ROW_0_DONE (1 << 5)
118 # define I965_MA_ROW_1_DONE (1 << 4)
119 # define I965_IC_ROW_0_DONE (1 << 3)
120 # define I965_IC_ROW_1_DONE (1 << 2)
121 # define I965_CP_DONE (1 << 1)
122 # define I965_RING_0_ENABLE (1 << 0)
124 # define ILK_ROW_0_EU_0_DONE (1 << 31)
125 # define ILK_ROW_0_EU_1_DONE (1 << 30)
126 # define ILK_ROW_0_EU_2_DONE (1 << 29)
127 # define ILK_ROW_0_EU_3_DONE (1 << 28)
128 # define ILK_ROW_1_EU_0_DONE (1 << 27)
129 # define ILK_ROW_1_EU_1_DONE (1 << 26)
130 # define ILK_ROW_1_EU_2_DONE (1 << 25)
131 # define ILK_ROW_1_EU_3_DONE (1 << 24)
132 # define ILK_ROW_2_EU_0_DONE (1 << 23)
133 # define ILK_ROW_2_EU_1_DONE (1 << 22)
134 # define ILK_ROW_2_EU_2_DONE (1 << 21)
135 # define ILK_ROW_2_EU_3_DONE (1 << 20)
136 # define ILK_VCP_DONE (1 << 19)
137 # define ILK_ROW_0_MATH_DONE (1 << 18)
138 # define ILK_ROW_1_MATH_DONE (1 << 17)
139 # define ILK_ROW_2_MATH_DONE (1 << 16)
140 # define ILK_VC1_DONE (1 << 15)
141 # define ILK_ROW_0_MA_DONE (1 << 14)
142 # define ILK_ROW_1_MA_DONE (1 << 13)
143 # define ILK_ROW_2_MA_DONE (1 << 12)
144 # define ILK_ROW_0_ISC_DONE (1 << 11)
145 # define ILK_ROW_1_ISC_DONE (1 << 10)
146 # define ILK_ROW_2_ISC_DONE (1 << 9)
147 # define ILK_VFE_DONE (1 << 8)
148 # define ILK_TD_DONE (1 << 7)
149 # define ILK_SVTS_DONE (1 << 6)
150 # define ILK_TS_DONE (1 << 5)
151 # define ILK_GW_DONE (1 << 4)
152 # define ILK_AI_DONE (1 << 3)
153 # define ILK_AC_DONE (1 << 2)
154 # define ILK_AM_DONE (1 << 1)
156 # define GEN6_MA_3_DONE (1 << 31)
157 # define GEN6_EU_32_DONE (1 << 30)
158 # define GEN6_EU_31_DONE (1 << 29)
159 # define GEN6_EU_30_DONE (1 << 28)
160 # define GEN6_MA_2_DONE (1 << 27)
161 # define GEN6_EU_22_DONE (1 << 26)
162 # define GEN6_EU_21_DONE (1 << 25)
163 # define GEN6_EU_20_DONE (1 << 24)
164 # define GEN6_MA_1_DONE (1 << 23)
165 # define GEN6_EU_12_DONE (1 << 22)
166 # define GEN6_EU_11_DONE (1 << 21)
167 # define GEN6_EU_10_DONE (1 << 20)
168 # define GEN6_MA_0_DONE (1 << 19)
169 # define GEN6_EU_02_DONE (1 << 18)
170 # define GEN6_EU_01_DONE (1 << 17)
171 # define GEN6_EU_00_DONE (1 << 16)
172 # define GEN6_IC_3_DONE (1 << 15)
173 # define GEN6_IC_2_DONE (1 << 14)
174 # define GEN6_IC_1_DONE (1 << 13)
175 # define GEN6_IC_0_DONE (1 << 12)
176 # define GEN6_ISC_10_DONE (1 << 11)
177 # define GEN6_ISC_32_DONE (1 << 10)
178 # define GEN6_VSC_DONE (1 << 9)
179 # define GEN6_IEF_DONE (1 << 8)
180 # define GEN6_VFE_DONE (1 << 7)
181 # define GEN6_TD_DONE (1 << 6)
182 # define GEN6_TS_DONE (1 << 4)
183 # define GEN6_GW_DONE (1 << 3)
184 # define GEN6_HIZ_DONE (1 << 2)
185 # define GEN6_AVS_DONE (1 << 1)
188 # define I965_GW_CS_DONE_CR (1 << 19)
189 # define I965_SVSM_CS_DONE_CR (1 << 18)
190 # define I965_SVDW_CS_DONE_CR (1 << 17)
191 # define I965_SVDR_CS_DONE_CR (1 << 16)
192 # define I965_SVRW_CS_DONE_CR (1 << 15)
193 # define I965_SVRR_CS_DONE_CR (1 << 14)
194 # define I965_SVTW_CS_DONE_CR (1 << 13)
195 # define I965_MASM_CS_DONE_CR (1 << 12)
196 # define I965_MASF_CS_DONE_CR (1 << 11)
197 # define I965_MAW_CS_DONE_CR (1 << 10)
198 # define I965_EM1_CS_DONE_CR (1 << 9)
199 # define I965_EM0_CS_DONE_CR (1 << 8)
200 # define I965_UC1_CS_DONE (1 << 7)
201 # define I965_UC0_CS_DONE (1 << 6)
202 # define I965_URB_CS_DONE (1 << 5)
203 # define I965_ISC_CS_DONE (1 << 4)
204 # define I965_CL_CS_DONE (1 << 3)
205 # define I965_GS_CS_DONE (1 << 2)
206 # define I965_VS0_CS_DONE (1 << 1)
207 # define I965_VF_CS_DONE (1 << 0)
209 # define G4X_BCS_DONE (1 << 31)
210 # define G4X_CS_DONE (1 << 30)
211 # define G4X_MASF_DONE (1 << 29)
212 # define G4X_SVDW_DONE (1 << 28)
213 # define G4X_SVDR_DONE (1 << 27)
214 # define G4X_SVRW_DONE (1 << 26)
215 # define G4X_SVRR_DONE (1 << 25)
216 # define G4X_ISC_DONE (1 << 24)
217 # define G4X_MT_DONE (1 << 23)
218 # define G4X_RC_DONE (1 << 22)
219 # define G4X_DAP_DONE (1 << 21)
220 # define G4X_MAWB_DONE (1 << 20)
221 # define G4X_MT_IDLE (1 << 19)
222 # define G4X_GBLT_BUSY (1 << 18)
223 # define G4X_SVSM_DONE (1 << 17)
224 # define G4X_MASM_DONE (1 << 16)
225 # define G4X_QC_DONE (1 << 15)
226 # define G4X_FL_DONE (1 << 14)
227 # define G4X_SC_DONE (1 << 13)
228 # define G4X_DM_DONE (1 << 12)
229 # define G4X_FT_DONE (1 << 11)
230 # define G4X_DG_DONE (1 << 10)
231 # define G4X_SI_DONE (1 << 9)
232 # define G4X_SO_DONE (1 << 8)
233 # define G4X_PL_DONE (1 << 7)
234 # define G4X_WIZ_DONE (1 << 6)
235 # define G4X_URB_DONE (1 << 5)
236 # define G4X_SF_DONE (1 << 4)
237 # define G4X_CL_DONE (1 << 3)
238 # define G4X_GS_DONE (1 << 2)
239 # define G4X_VS0_DONE (1 << 1)
240 # define G4X_VF_DONE (1 << 0)
243 # define GEN6_GAM_DONE (1 << 31)
244 # define GEN6_CS_DONE (1 << 30)
245 # define GEN6_WMBE_DONE (1 << 29)
246 # define GEN6_SVRW_DONE (1 << 28)
247 # define GEN6_RCC_DONE (1 << 27)
248 # define GEN6_SVG_DONE (1 << 26)
249 # define GEN6_ISC_DONE (1 << 25)
250 # define GEN6_MT_DONE (1 << 24)
251 # define GEN6_RCPFE_DONE (1 << 23)
252 # define GEN6_RCPBE_DONE (1 << 22)
253 # define GEN6_VDI_DONE (1 << 21)
254 # define GEN6_RCZ_DONE (1 << 20)
255 # define GEN6_DAP_DONE (1 << 19)
256 # define GEN6_PSD_DONE (1 << 18)
257 # define GEN6_IZ_DONE (1 << 17)
258 # define GEN6_WMFE_DONE (1 << 16)
259 # define GEN6_SVSM_DONE (1 << 15)
260 # define GEN6_QC_DONE (1 << 14)
261 # define GEN6_FL_DONE (1 << 13)
262 # define GEN6_SC_DONE (1 << 12)
263 # define GEN6_DM_DONE (1 << 11)
264 # define GEN6_FT_DONE (1 << 10)
265 # define GEN6_DG_DONE (1 << 9)
266 # define GEN6_SI_DONE (1 << 8)
267 # define GEN6_SO_DONE (1 << 7)
268 # define GEN6_PL_DONE (1 << 6)
269 # define GEN6_VME_DONE (1 << 5)
270 # define GEN6_SF_DONE (1 << 4)
271 # define GEN6_CL_DONE (1 << 3)
272 # define GEN6_GS_DONE (1 << 2)
273 # define GEN6_VS0_DONE (1 << 1)
274 # define GEN6_VF_DONE (1 << 0)
276 struct instdone_bit instdone_bits[MAX_INSTDONE_BITS];
277 int num_instdone_bits = 0;
280 add_instdone_bit(uint32_t reg, uint32_t bit, const char *name)
282 assert(num_instdone_bits < MAX_INSTDONE_BITS);
283 instdone_bits[num_instdone_bits].reg = reg;
284 instdone_bits[num_instdone_bits].bit = bit;
285 instdone_bits[num_instdone_bits].name = name;
290 gen3_instdone_bit(uint32_t bit, const char *name)
292 add_instdone_bit(INSTDONE, bit, name);
296 gen4_instdone_bit(uint32_t bit, const char *name)
298 add_instdone_bit(INSTDONE_I965, bit, name);
302 gen4_instdone1_bit(uint32_t bit, const char *name)
304 add_instdone_bit(INSTDONE_1, bit, name);
308 gen6_instdone1_bit(uint32_t bit, const char *name)
310 add_instdone_bit(INSTDONE_I965, bit, name);
314 gen6_instdone2_bit(uint32_t bit, const char *name)
316 add_instdone_bit(INSTDONE_1, bit, name);
320 init_g965_instdone1(void)
322 gen4_instdone1_bit(I965_GW_CS_DONE_CR, "GW CS CR");
323 gen4_instdone1_bit(I965_SVSM_CS_DONE_CR, "SVSM CS CR");
324 gen4_instdone1_bit(I965_SVDW_CS_DONE_CR, "SVDW CS CR");
325 gen4_instdone1_bit(I965_SVDR_CS_DONE_CR, "SVDR CS CR");
326 gen4_instdone1_bit(I965_SVRW_CS_DONE_CR, "SVRW CS CR");
327 gen4_instdone1_bit(I965_SVRR_CS_DONE_CR, "SVRR CS CR");
328 gen4_instdone1_bit(I965_SVTW_CS_DONE_CR, "SVTW CS CR");
329 gen4_instdone1_bit(I965_MASM_CS_DONE_CR, "MASM CS CR");
330 gen4_instdone1_bit(I965_MASF_CS_DONE_CR, "MASF CS CR");
331 gen4_instdone1_bit(I965_MAW_CS_DONE_CR, "MAW CS CR");
332 gen4_instdone1_bit(I965_EM1_CS_DONE_CR, "EM1 CS CR");
333 gen4_instdone1_bit(I965_EM0_CS_DONE_CR, "EM0 CS CR");
334 gen4_instdone1_bit(I965_UC1_CS_DONE, "UC1 CS");
335 gen4_instdone1_bit(I965_UC0_CS_DONE, "UC0 CS");
336 gen4_instdone1_bit(I965_URB_CS_DONE, "URB CS");
337 gen4_instdone1_bit(I965_ISC_CS_DONE, "ISC CS");
338 gen4_instdone1_bit(I965_CL_CS_DONE, "CL CS");
339 gen4_instdone1_bit(I965_GS_CS_DONE, "GS CS");
340 gen4_instdone1_bit(I965_VS0_CS_DONE, "VS0 CS");
341 gen4_instdone1_bit(I965_VF_CS_DONE, "VF CS");
345 init_g4x_instdone1(void)
347 gen4_instdone1_bit(G4X_BCS_DONE, "BCS");
348 gen4_instdone1_bit(G4X_CS_DONE, "CS");
349 gen4_instdone1_bit(G4X_MASF_DONE, "MASF");
350 gen4_instdone1_bit(G4X_SVDW_DONE, "SVDW");
351 gen4_instdone1_bit(G4X_SVDR_DONE, "SVDR");
352 gen4_instdone1_bit(G4X_SVRW_DONE, "SVRW");
353 gen4_instdone1_bit(G4X_SVRR_DONE, "SVRR");
354 gen4_instdone1_bit(G4X_ISC_DONE, "ISC");
355 gen4_instdone1_bit(G4X_MT_DONE, "MT");
356 gen4_instdone1_bit(G4X_RC_DONE, "RC");
357 gen4_instdone1_bit(G4X_DAP_DONE, "DAP");
358 gen4_instdone1_bit(G4X_MAWB_DONE, "MAWB");
359 gen4_instdone1_bit(G4X_MT_IDLE, "MT idle");
360 //gen4_instdone1_bit(G4X_GBLT_BUSY, "GBLT");
361 gen4_instdone1_bit(G4X_SVSM_DONE, "SVSM");
362 gen4_instdone1_bit(G4X_MASM_DONE, "MASM");
363 gen4_instdone1_bit(G4X_QC_DONE, "QC");
364 gen4_instdone1_bit(G4X_FL_DONE, "FL");
365 gen4_instdone1_bit(G4X_SC_DONE, "SC");
366 gen4_instdone1_bit(G4X_DM_DONE, "DM");
367 gen4_instdone1_bit(G4X_FT_DONE, "FT");
368 gen4_instdone1_bit(G4X_DG_DONE, "DG");
369 gen4_instdone1_bit(G4X_SI_DONE, "SI");
370 gen4_instdone1_bit(G4X_SO_DONE, "SO");
371 gen4_instdone1_bit(G4X_PL_DONE, "PL");
372 gen4_instdone1_bit(G4X_WIZ_DONE, "WIZ");
373 gen4_instdone1_bit(G4X_URB_DONE, "URB");
374 gen4_instdone1_bit(G4X_SF_DONE, "SF");
375 gen4_instdone1_bit(G4X_CL_DONE, "CL");
376 gen4_instdone1_bit(G4X_GS_DONE, "GS");
377 gen4_instdone1_bit(G4X_VS0_DONE, "VS0");
378 gen4_instdone1_bit(G4X_VF_DONE, "VF");
382 init_gen7_instdone(void)
384 gen6_instdone1_bit(1 << 19, "GAM");
385 gen6_instdone1_bit(1 << 18, "GAFM");
386 gen6_instdone1_bit(1 << 17, "TSG");
387 gen6_instdone1_bit(1 << 16, "VFE");
388 gen6_instdone1_bit(1 << 15, "GAFS");
389 gen6_instdone1_bit(1 << 14, "SVG");
390 gen6_instdone1_bit(1 << 13, "URBM");
391 gen6_instdone1_bit(1 << 12, "TDG");
392 gen6_instdone1_bit(1 << 9, "SF");
393 gen6_instdone1_bit(1 << 8, "CL");
394 gen6_instdone1_bit(1 << 7, "SOL");
395 gen6_instdone1_bit(1 << 6, "GS");
396 gen6_instdone1_bit(1 << 5, "DS");
397 gen6_instdone1_bit(1 << 4, "TE");
398 gen6_instdone1_bit(1 << 3, "HS");
399 gen6_instdone1_bit(1 << 2, "VS");
400 gen6_instdone1_bit(1 << 1, "VF");
404 init_gen75_instdone(void)
406 gen6_instdone1_bit(1 << 21, "CS");
407 gen6_instdone1_bit(1 << 20, "RS");
408 init_gen7_instdone();
412 init_gen8_instdone(void)
414 gen6_instdone1_bit(1 << 23, "FBC");
415 gen6_instdone1_bit(1 << 22, "SDE");
416 init_gen75_instdone();
420 init_instdone_definitions(uint32_t devid)
422 if (IS_GEN8(devid)) {
423 init_gen8_instdone();
424 } else if (IS_GEN7(devid)) {
425 init_gen7_instdone();
426 } else if (IS_GEN6(devid)) {
427 /* Now called INSTDONE_1 in the docs. */
428 gen6_instdone1_bit(GEN6_MA_3_DONE, "Message Arbiter 3");
429 gen6_instdone1_bit(GEN6_EU_32_DONE, "EU 32");
430 gen6_instdone1_bit(GEN6_EU_31_DONE, "EU 31");
431 gen6_instdone1_bit(GEN6_EU_30_DONE, "EU 30");
432 gen6_instdone1_bit(GEN6_MA_3_DONE, "Message Arbiter 2");
433 gen6_instdone1_bit(GEN6_EU_22_DONE, "EU 22");
434 gen6_instdone1_bit(GEN6_EU_21_DONE, "EU 21");
435 gen6_instdone1_bit(GEN6_EU_20_DONE, "EU 20");
436 gen6_instdone1_bit(GEN6_MA_3_DONE, "Message Arbiter 1");
437 gen6_instdone1_bit(GEN6_EU_12_DONE, "EU 12");
438 gen6_instdone1_bit(GEN6_EU_11_DONE, "EU 11");
439 gen6_instdone1_bit(GEN6_EU_10_DONE, "EU 10");
440 gen6_instdone1_bit(GEN6_MA_3_DONE, "Message Arbiter 0");
441 gen6_instdone1_bit(GEN6_EU_02_DONE, "EU 02");
442 gen6_instdone1_bit(GEN6_EU_01_DONE, "EU 01");
443 gen6_instdone1_bit(GEN6_EU_00_DONE, "EU 00");
445 gen6_instdone1_bit(GEN6_IC_3_DONE, "IC 3");
446 gen6_instdone1_bit(GEN6_IC_2_DONE, "IC 2");
447 gen6_instdone1_bit(GEN6_IC_1_DONE, "IC 1");
448 gen6_instdone1_bit(GEN6_IC_0_DONE, "IC 0");
449 gen6_instdone1_bit(GEN6_ISC_10_DONE, "ISC 1/0");
450 gen6_instdone1_bit(GEN6_ISC_32_DONE, "ISC 3/2");
452 gen6_instdone1_bit(GEN6_VSC_DONE, "VSC");
453 gen6_instdone1_bit(GEN6_IEF_DONE, "IEF");
454 gen6_instdone1_bit(GEN6_VFE_DONE, "VFE");
455 gen6_instdone1_bit(GEN6_TD_DONE, "TD");
456 gen6_instdone1_bit(GEN6_TS_DONE, "TS");
457 gen6_instdone1_bit(GEN6_GW_DONE, "GW");
458 gen6_instdone1_bit(GEN6_HIZ_DONE, "HIZ");
459 gen6_instdone1_bit(GEN6_AVS_DONE, "AVS");
461 /* Now called INSTDONE_2 in the docs. */
462 gen6_instdone2_bit(GEN6_GAM_DONE, "GAM");
463 gen6_instdone2_bit(GEN6_CS_DONE, "CS");
464 gen6_instdone2_bit(GEN6_WMBE_DONE, "WMBE");
465 gen6_instdone2_bit(GEN6_SVRW_DONE, "SVRW");
466 gen6_instdone2_bit(GEN6_RCC_DONE, "RCC");
467 gen6_instdone2_bit(GEN6_SVG_DONE, "SVG");
468 gen6_instdone2_bit(GEN6_ISC_DONE, "ISC");
469 gen6_instdone2_bit(GEN6_MT_DONE, "MT");
470 gen6_instdone2_bit(GEN6_RCPFE_DONE, "RCPFE");
471 gen6_instdone2_bit(GEN6_RCPBE_DONE, "RCPBE");
472 gen6_instdone2_bit(GEN6_VDI_DONE, "VDI");
473 gen6_instdone2_bit(GEN6_RCZ_DONE, "RCZ");
474 gen6_instdone2_bit(GEN6_DAP_DONE, "DAP");
475 gen6_instdone2_bit(GEN6_PSD_DONE, "PSD");
476 gen6_instdone2_bit(GEN6_IZ_DONE, "IZ");
477 gen6_instdone2_bit(GEN6_WMFE_DONE, "WMFE");
478 gen6_instdone2_bit(GEN6_SVSM_DONE, "SVSM");
479 gen6_instdone2_bit(GEN6_QC_DONE, "QC");
480 gen6_instdone2_bit(GEN6_FL_DONE, "FL");
481 gen6_instdone2_bit(GEN6_SC_DONE, "SC");
482 gen6_instdone2_bit(GEN6_DM_DONE, "DM");
483 gen6_instdone2_bit(GEN6_FT_DONE, "FT");
484 gen6_instdone2_bit(GEN6_DG_DONE, "DG");
485 gen6_instdone2_bit(GEN6_SI_DONE, "SI");
486 gen6_instdone2_bit(GEN6_SO_DONE, "SO");
487 gen6_instdone2_bit(GEN6_PL_DONE, "PL");
488 gen6_instdone2_bit(GEN6_VME_DONE, "VME");
489 gen6_instdone2_bit(GEN6_SF_DONE, "SF");
490 gen6_instdone2_bit(GEN6_CL_DONE, "CL");
491 gen6_instdone2_bit(GEN6_GS_DONE, "GS");
492 gen6_instdone2_bit(GEN6_VS0_DONE, "VS0");
493 gen6_instdone2_bit(GEN6_VF_DONE, "VF");
494 } else if (IS_GEN5(devid)) {
495 gen4_instdone_bit(ILK_ROW_0_EU_0_DONE, "Row 0, EU 0");
496 gen4_instdone_bit(ILK_ROW_0_EU_1_DONE, "Row 0, EU 1");
497 gen4_instdone_bit(ILK_ROW_0_EU_2_DONE, "Row 0, EU 2");
498 gen4_instdone_bit(ILK_ROW_0_EU_3_DONE, "Row 0, EU 3");
499 gen4_instdone_bit(ILK_ROW_1_EU_0_DONE, "Row 1, EU 0");
500 gen4_instdone_bit(ILK_ROW_1_EU_1_DONE, "Row 1, EU 1");
501 gen4_instdone_bit(ILK_ROW_1_EU_2_DONE, "Row 1, EU 2");
502 gen4_instdone_bit(ILK_ROW_1_EU_3_DONE, "Row 1, EU 3");
503 gen4_instdone_bit(ILK_ROW_2_EU_0_DONE, "Row 2, EU 0");
504 gen4_instdone_bit(ILK_ROW_2_EU_1_DONE, "Row 2, EU 1");
505 gen4_instdone_bit(ILK_ROW_2_EU_2_DONE, "Row 2, EU 2");
506 gen4_instdone_bit(ILK_ROW_2_EU_3_DONE, "Row 2, EU 3");
507 gen4_instdone_bit(ILK_VCP_DONE, "VCP");
508 gen4_instdone_bit(ILK_ROW_0_MATH_DONE, "Row 0 math");
509 gen4_instdone_bit(ILK_ROW_1_MATH_DONE, "Row 1 math");
510 gen4_instdone_bit(ILK_ROW_2_MATH_DONE, "Row 2 math");
511 gen4_instdone_bit(ILK_VC1_DONE, "VC1");
512 gen4_instdone_bit(ILK_ROW_0_MA_DONE, "Row 0 MA");
513 gen4_instdone_bit(ILK_ROW_1_MA_DONE, "Row 1 MA");
514 gen4_instdone_bit(ILK_ROW_2_MA_DONE, "Row 2 MA");
515 gen4_instdone_bit(ILK_ROW_0_ISC_DONE, "Row 0 ISC");
516 gen4_instdone_bit(ILK_ROW_1_ISC_DONE, "Row 1 ISC");
517 gen4_instdone_bit(ILK_ROW_2_ISC_DONE, "Row 2 ISC");
518 gen4_instdone_bit(ILK_VFE_DONE, "VFE");
519 gen4_instdone_bit(ILK_TD_DONE, "TD");
520 gen4_instdone_bit(ILK_SVTS_DONE, "SVTS");
521 gen4_instdone_bit(ILK_TS_DONE, "TS");
522 gen4_instdone_bit(ILK_GW_DONE, "GW");
523 gen4_instdone_bit(ILK_AI_DONE, "AI");
524 gen4_instdone_bit(ILK_AC_DONE, "AC");
525 gen4_instdone_bit(ILK_AM_DONE, "AM");
527 init_g4x_instdone1();
528 } else if (IS_GEN4(devid)) {
529 gen4_instdone_bit(I965_ROW_0_EU_0_DONE, "Row 0, EU 0");
530 gen4_instdone_bit(I965_ROW_0_EU_1_DONE, "Row 0, EU 1");
531 gen4_instdone_bit(I965_ROW_0_EU_2_DONE, "Row 0, EU 2");
532 gen4_instdone_bit(I965_ROW_0_EU_3_DONE, "Row 0, EU 3");
533 gen4_instdone_bit(I965_ROW_1_EU_0_DONE, "Row 1, EU 0");
534 gen4_instdone_bit(I965_ROW_1_EU_1_DONE, "Row 1, EU 1");
535 gen4_instdone_bit(I965_ROW_1_EU_2_DONE, "Row 1, EU 2");
536 gen4_instdone_bit(I965_ROW_1_EU_3_DONE, "Row 1, EU 3");
537 gen4_instdone_bit(I965_SF_DONE, "Strips and Fans");
538 gen4_instdone_bit(I965_SE_DONE, "Setup Engine");
539 gen4_instdone_bit(I965_WM_DONE, "Windowizer");
540 gen4_instdone_bit(I965_DISPATCHER_DONE, "Dispatcher");
541 gen4_instdone_bit(I965_PROJECTION_DONE, "Projection and LOD");
542 gen4_instdone_bit(I965_DG_DONE, "Dependent address generator");
543 gen4_instdone_bit(I965_QUAD_CACHE_DONE, "Texture fetch");
544 gen4_instdone_bit(I965_TEXTURE_FETCH_DONE, "Texture fetch");
545 gen4_instdone_bit(I965_TEXTURE_DECOMPRESS_DONE, "Texture decompress");
546 gen4_instdone_bit(I965_SAMPLER_CACHE_DONE, "Sampler cache");
547 gen4_instdone_bit(I965_FILTER_DONE, "Filtering");
548 gen4_instdone_bit(I965_BYPASS_DONE, "Bypass FIFO");
549 gen4_instdone_bit(I965_PS_DONE, "Pixel shader");
550 gen4_instdone_bit(I965_CC_DONE, "Color calculator");
551 gen4_instdone_bit(I965_MAP_FILTER_DONE, "Map filter");
552 gen4_instdone_bit(I965_MAP_L2_IDLE, "Map L2");
553 gen4_instdone_bit(I965_MA_ROW_0_DONE, "Message Arbiter row 0");
554 gen4_instdone_bit(I965_MA_ROW_1_DONE, "Message Arbiter row 1");
555 gen4_instdone_bit(I965_IC_ROW_0_DONE, "Instruction cache row 0");
556 gen4_instdone_bit(I965_IC_ROW_1_DONE, "Instruction cache row 1");
557 gen4_instdone_bit(I965_CP_DONE, "Command Processor");
560 init_g4x_instdone1();
562 init_g965_instdone1();
564 } else if (IS_GEN3(devid)) {
565 gen3_instdone_bit(IDCT_DONE, "IDCT");
566 gen3_instdone_bit(IQ_DONE, "IQ");
567 gen3_instdone_bit(PR_DONE, "PR");
568 gen3_instdone_bit(VLD_DONE, "VLD");
569 gen3_instdone_bit(IP_DONE, "Instruction parser");
570 gen3_instdone_bit(FBC_DONE, "Framebuffer Compression");
571 gen3_instdone_bit(BINNER_DONE, "Binner");
572 gen3_instdone_bit(SF_DONE, "Strips and fans");
573 gen3_instdone_bit(SE_DONE, "Setup engine");
574 gen3_instdone_bit(WM_DONE, "Windowizer");
575 gen3_instdone_bit(IZ_DONE, "Intermediate Z");
576 gen3_instdone_bit(PERSPECTIVE_INTERP_DONE, "Perspective interpolation");
577 gen3_instdone_bit(DISPATCHER_DONE, "Dispatcher");
578 gen3_instdone_bit(PROJECTION_DONE, "Projection and LOD");
579 gen3_instdone_bit(DEPENDENT_ADDRESS_DONE, "Dependent address calculation");
580 gen3_instdone_bit(TEXTURE_FETCH_DONE, "Texture fetch");
581 gen3_instdone_bit(TEXTURE_DECOMPRESS_DONE, "Texture decompression");
582 gen3_instdone_bit(SAMPLER_CACHE_DONE, "Sampler Cache");
583 gen3_instdone_bit(FILTER_DONE, "Filtering");
584 gen3_instdone_bit(BYPASS_FIFO_DONE, "Bypass FIFO");
585 gen3_instdone_bit(PS_DONE, "Pixel shader");
586 gen3_instdone_bit(CC_DONE, "Color calculator");
587 gen3_instdone_bit(MAP_FILTER_DONE, "Map filter");
588 gen3_instdone_bit(MAP_L2_IDLE, "Map L2");
590 assert(IS_GEN2(devid));
591 gen3_instdone_bit(I830_GMBUS_DONE, "GMBUS");
592 gen3_instdone_bit(I830_FBC_DONE, "FBC");
593 gen3_instdone_bit(I830_BINNER_DONE, "BINNER");
594 gen3_instdone_bit(I830_MPEG_DONE, "MPEG");
595 gen3_instdone_bit(I830_MECO_DONE, "MECO");
596 gen3_instdone_bit(I830_MCD_DONE, "MCD");
597 gen3_instdone_bit(I830_MCSTP_DONE, "MCSTP");
598 gen3_instdone_bit(I830_CC_DONE, "CC");
599 gen3_instdone_bit(I830_DG_DONE, "DG");
600 gen3_instdone_bit(I830_DCMP_DONE, "DCMP");
601 gen3_instdone_bit(I830_FTCH_DONE, "FTCH");
602 gen3_instdone_bit(I830_IT_DONE, "IT");
603 gen3_instdone_bit(I830_MG_DONE, "MG");
604 gen3_instdone_bit(I830_MEC_DONE, "MEC");
605 gen3_instdone_bit(I830_PC_DONE, "PC");
606 gen3_instdone_bit(I830_QCC_DONE, "QCC");
607 gen3_instdone_bit(I830_TB_DONE, "TB");
608 gen3_instdone_bit(I830_WM_DONE, "WM");
609 gen3_instdone_bit(I830_EF_DONE, "EF");
610 gen3_instdone_bit(I830_BLITTER_DONE, "Blitter");
611 gen3_instdone_bit(I830_MAP_L2_DONE, "Map L2 cache");
612 gen3_instdone_bit(I830_SECONDARY_RING_3_DONE, "Secondary ring 3");
613 gen3_instdone_bit(I830_SECONDARY_RING_2_DONE, "Secondary ring 2");
614 gen3_instdone_bit(I830_SECONDARY_RING_1_DONE, "Secondary ring 1");
615 gen3_instdone_bit(I830_SECONDARY_RING_0_DONE, "Secondary ring 0");
616 gen3_instdone_bit(I830_PRIMARY_RING_1_DONE, "Primary ring 1");
617 gen3_instdone_bit(I830_PRIMARY_RING_0_DONE, "Primary ring 0");