Lines Matching +full:0 +full:x00000000 +full:- +full:0 +full:x0fffffff
56 unsigned fb_div = 0, vclk_div = 0, dclk_div = 0; in rv770_set_uvd_clocks()
60 if (rdev->family == CHIP_RV740) in rv770_set_uvd_clocks()
71 return 0; in rv770_set_uvd_clocks()
75 43663, 0x03FFFFFE, 1, 30, ~0, in rv770_set_uvd_clocks()
81 vclk_div -= 1; in rv770_set_uvd_clocks()
82 dclk_div -= 1; in rv770_set_uvd_clocks()
84 /* set UPLL_FB_DIV to 0x50000 */ in rv770_set_uvd_clocks()
85 WREG32_P(CG_UPLL_FUNC_CNTL_3, UPLL_FB_DIV(0x50000), ~UPLL_FB_DIV_MASK); in rv770_set_uvd_clocks()
88 WREG32_P(CG_UPLL_FUNC_CNTL, 0, ~(UPLL_RESET_MASK | UPLL_SLEEP_MASK)); in rv770_set_uvd_clocks()
90 /* assert BYPASS EN and FB_DIV[0] <- ??? why? */ in rv770_set_uvd_clocks()
117 WREG32_P(CG_UPLL_FUNC_CNTL, 0, ~UPLL_RESET_MASK); in rv770_set_uvd_clocks()
121 /* deassert BYPASS EN and FB_DIV[0] <- ??? why? */ in rv770_set_uvd_clocks()
122 WREG32_P(CG_UPLL_FUNC_CNTL, 0, ~UPLL_BYPASS_EN_MASK); in rv770_set_uvd_clocks()
123 WREG32_P(CG_UPLL_FUNC_CNTL_3, 0, ~UPLL_FB_DIV(1)); in rv770_set_uvd_clocks()
136 return 0; in rv770_set_uvd_clocks()
140 0x8d00, 0xffffffff, 0x0e0e0074,
141 0x8d04, 0xffffffff, 0x013a2b34,
142 0x9508, 0xffffffff, 0x00000002,
143 0x8b20, 0xffffffff, 0,
144 0x88c4, 0xffffffff, 0x000000c2,
145 0x28350, 0xffffffff, 0,
146 0x9058, 0xffffffff, 0x0fffc40f,
147 0x240c, 0xffffffff, 0x00000380,
148 0x733c, 0xffffffff, 0x00000002,
149 0x2650, 0x00040000, 0,
150 0x20bc, 0x00040000, 0,
151 0x7300, 0xffffffff, 0x001000f0
155 0x8db0, 0xffffffff, 0x98989898,
156 0x8db4, 0xffffffff, 0x98989898,
157 0x8db8, 0xffffffff, 0x98989898,
158 0x8dbc, 0xffffffff, 0x98989898,
159 0x8dc0, 0xffffffff, 0x98989898,
160 0x8dc4, 0xffffffff, 0x98989898,
161 0x8dc8, 0xffffffff, 0x98989898,
162 0x8dcc, 0xffffffff, 0x98989898,
163 0x88c4, 0xffffffff, 0x00000082
167 0x562c, 0xffffffff, 0,
168 0x3f90, 0xffffffff, 0,
169 0x9148, 0xffffffff, 0,
170 0x3f94, 0xffffffff, 0,
171 0x914c, 0xffffffff, 0,
172 0x9698, 0x18000000, 0x18000000
176 0x562c, 0xffffffff, 0,
177 0x3f90, 0xffffffff, 0x00cc0000,
178 0x9148, 0xffffffff, 0x00cc0000,
179 0x3f94, 0xffffffff, 0x00cc0000,
180 0x914c, 0xffffffff, 0x00cc0000,
181 0x9b7c, 0xffffffff, 0x00fa0000,
182 0x3f8c, 0xffffffff, 0x00fa0000,
183 0x9698, 0x18000000, 0x18000000
187 0x8bcc, 0xffffffff, 0x130300f9,
188 0x5448, 0xffffffff, 0x100,
189 0x55e4, 0xffffffff, 0x100,
190 0x160c, 0xffffffff, 0x100,
191 0x5644, 0xffffffff, 0x100,
192 0xc164, 0xffffffff, 0x100,
193 0x8a18, 0xffffffff, 0x100,
194 0x897c, 0xffffffff, 0x8000100,
195 0x8b28, 0xffffffff, 0x3c000100,
196 0x9144, 0xffffffff, 0x100,
197 0x9a1c, 0xffffffff, 0x10000,
198 0x9a50, 0xffffffff, 0x100,
199 0x9a1c, 0xffffffff, 0x10001,
200 0x9a50, 0xffffffff, 0x100,
201 0x9a1c, 0xffffffff, 0x10002,
202 0x9a50, 0xffffffff, 0x100,
203 0x9a1c, 0xffffffff, 0x10003,
204 0x9a50, 0xffffffff, 0x100,
205 0x9a1c, 0xffffffff, 0x0,
206 0x9870, 0xffffffff, 0x100,
207 0x8d58, 0xffffffff, 0x100,
208 0x9500, 0xffffffff, 0x0,
209 0x9510, 0xffffffff, 0x100,
210 0x9500, 0xffffffff, 0x1,
211 0x9510, 0xffffffff, 0x100,
212 0x9500, 0xffffffff, 0x2,
213 0x9510, 0xffffffff, 0x100,
214 0x9500, 0xffffffff, 0x3,
215 0x9510, 0xffffffff, 0x100,
216 0x9500, 0xffffffff, 0x4,
217 0x9510, 0xffffffff, 0x100,
218 0x9500, 0xffffffff, 0x5,
219 0x9510, 0xffffffff, 0x100,
220 0x9500, 0xffffffff, 0x6,
221 0x9510, 0xffffffff, 0x100,
222 0x9500, 0xffffffff, 0x7,
223 0x9510, 0xffffffff, 0x100,
224 0x9500, 0xffffffff, 0x8,
225 0x9510, 0xffffffff, 0x100,
226 0x9500, 0xffffffff, 0x9,
227 0x9510, 0xffffffff, 0x100,
228 0x9500, 0xffffffff, 0x8000,
229 0x9490, 0xffffffff, 0x0,
230 0x949c, 0xffffffff, 0x100,
231 0x9490, 0xffffffff, 0x1,
232 0x949c, 0xffffffff, 0x100,
233 0x9490, 0xffffffff, 0x2,
234 0x949c, 0xffffffff, 0x100,
235 0x9490, 0xffffffff, 0x3,
236 0x949c, 0xffffffff, 0x100,
237 0x9490, 0xffffffff, 0x4,
238 0x949c, 0xffffffff, 0x100,
239 0x9490, 0xffffffff, 0x5,
240 0x949c, 0xffffffff, 0x100,
241 0x9490, 0xffffffff, 0x6,
242 0x949c, 0xffffffff, 0x100,
243 0x9490, 0xffffffff, 0x7,
244 0x949c, 0xffffffff, 0x100,
245 0x9490, 0xffffffff, 0x8,
246 0x949c, 0xffffffff, 0x100,
247 0x9490, 0xffffffff, 0x9,
248 0x949c, 0xffffffff, 0x100,
249 0x9490, 0xffffffff, 0x8000,
250 0x9604, 0xffffffff, 0x0,
251 0x9654, 0xffffffff, 0x100,
252 0x9604, 0xffffffff, 0x1,
253 0x9654, 0xffffffff, 0x100,
254 0x9604, 0xffffffff, 0x2,
255 0x9654, 0xffffffff, 0x100,
256 0x9604, 0xffffffff, 0x3,
257 0x9654, 0xffffffff, 0x100,
258 0x9604, 0xffffffff, 0x4,
259 0x9654, 0xffffffff, 0x100,
260 0x9604, 0xffffffff, 0x5,
261 0x9654, 0xffffffff, 0x100,
262 0x9604, 0xffffffff, 0x6,
263 0x9654, 0xffffffff, 0x100,
264 0x9604, 0xffffffff, 0x7,
265 0x9654, 0xffffffff, 0x100,
266 0x9604, 0xffffffff, 0x8,
267 0x9654, 0xffffffff, 0x100,
268 0x9604, 0xffffffff, 0x9,
269 0x9654, 0xffffffff, 0x100,
270 0x9604, 0xffffffff, 0x80000000,
271 0x9030, 0xffffffff, 0x100,
272 0x9034, 0xffffffff, 0x100,
273 0x9038, 0xffffffff, 0x100,
274 0x903c, 0xffffffff, 0x100,
275 0x9040, 0xffffffff, 0x100,
276 0xa200, 0xffffffff, 0x100,
277 0xa204, 0xffffffff, 0x100,
278 0xa208, 0xffffffff, 0x100,
279 0xa20c, 0xffffffff, 0x100,
280 0x971c, 0xffffffff, 0x100,
281 0x915c, 0xffffffff, 0x00020001,
282 0x9160, 0xffffffff, 0x00040003,
283 0x916c, 0xffffffff, 0x00060005,
284 0x9170, 0xffffffff, 0x00080007,
285 0x9174, 0xffffffff, 0x000a0009,
286 0x9178, 0xffffffff, 0x000c000b,
287 0x917c, 0xffffffff, 0x000e000d,
288 0x9180, 0xffffffff, 0x0010000f,
289 0x918c, 0xffffffff, 0x00120011,
290 0x9190, 0xffffffff, 0x00140013,
291 0x9194, 0xffffffff, 0x00020001,
292 0x9198, 0xffffffff, 0x00040003,
293 0x919c, 0xffffffff, 0x00060005,
294 0x91a8, 0xffffffff, 0x00080007,
295 0x91ac, 0xffffffff, 0x000a0009,
296 0x91b0, 0xffffffff, 0x000c000b,
297 0x91b4, 0xffffffff, 0x000e000d,
298 0x91b8, 0xffffffff, 0x0010000f,
299 0x91c4, 0xffffffff, 0x00120011,
300 0x91c8, 0xffffffff, 0x00140013,
301 0x91cc, 0xffffffff, 0x00020001,
302 0x91d0, 0xffffffff, 0x00040003,
303 0x91d4, 0xffffffff, 0x00060005,
304 0x91e0, 0xffffffff, 0x00080007,
305 0x91e4, 0xffffffff, 0x000a0009,
306 0x91e8, 0xffffffff, 0x000c000b,
307 0x91ec, 0xffffffff, 0x00020001,
308 0x91f0, 0xffffffff, 0x00040003,
309 0x91f4, 0xffffffff, 0x00060005,
310 0x9200, 0xffffffff, 0x00080007,
311 0x9204, 0xffffffff, 0x000a0009,
312 0x9208, 0xffffffff, 0x000c000b,
313 0x920c, 0xffffffff, 0x000e000d,
314 0x9210, 0xffffffff, 0x0010000f,
315 0x921c, 0xffffffff, 0x00120011,
316 0x9220, 0xffffffff, 0x00140013,
317 0x9224, 0xffffffff, 0x00020001,
318 0x9228, 0xffffffff, 0x00040003,
319 0x922c, 0xffffffff, 0x00060005,
320 0x9238, 0xffffffff, 0x00080007,
321 0x923c, 0xffffffff, 0x000a0009,
322 0x9240, 0xffffffff, 0x000c000b,
323 0x9244, 0xffffffff, 0x000e000d,
324 0x9248, 0xffffffff, 0x0010000f,
325 0x9254, 0xffffffff, 0x00120011,
326 0x9258, 0xffffffff, 0x00140013,
327 0x925c, 0xffffffff, 0x00020001,
328 0x9260, 0xffffffff, 0x00040003,
329 0x9264, 0xffffffff, 0x00060005,
330 0x9270, 0xffffffff, 0x00080007,
331 0x9274, 0xffffffff, 0x000a0009,
332 0x9278, 0xffffffff, 0x000c000b,
333 0x927c, 0xffffffff, 0x000e000d,
334 0x9280, 0xffffffff, 0x0010000f,
335 0x928c, 0xffffffff, 0x00120011,
336 0x9290, 0xffffffff, 0x00140013,
337 0x9294, 0xffffffff, 0x00020001,
338 0x929c, 0xffffffff, 0x00040003,
339 0x92a0, 0xffffffff, 0x00060005,
340 0x92a4, 0xffffffff, 0x00080007
344 0x3f90, 0x00ff0000, 0x00fc0000,
345 0x9148, 0x00ff0000, 0x00fc0000,
346 0x3f94, 0x00ff0000, 0x00fc0000,
347 0x914c, 0x00ff0000, 0x00fc0000,
348 0xb4c, 0x00000020, 0x00000020,
349 0xa180, 0xffffffff, 0x00003f3f
353 0x8bcc, 0xffffffff, 0x13030040,
354 0x5448, 0xffffffff, 0x100,
355 0x55e4, 0xffffffff, 0x100,
356 0x160c, 0xffffffff, 0x100,
357 0x5644, 0xffffffff, 0x100,
358 0xc164, 0xffffffff, 0x100,
359 0x8a18, 0xffffffff, 0x100,
360 0x897c, 0xffffffff, 0x8000100,
361 0x8b28, 0xffffffff, 0x3c000100,
362 0x9144, 0xffffffff, 0x100,
363 0x9a1c, 0xffffffff, 0x10000,
364 0x9a50, 0xffffffff, 0x100,
365 0x9a1c, 0xffffffff, 0x0,
366 0x9870, 0xffffffff, 0x100,
367 0x8d58, 0xffffffff, 0x100,
368 0x9500, 0xffffffff, 0x0,
369 0x9510, 0xffffffff, 0x100,
370 0x9500, 0xffffffff, 0x1,
371 0x9510, 0xffffffff, 0x100,
372 0x9500, 0xffffffff, 0x8000,
373 0x9490, 0xffffffff, 0x0,
374 0x949c, 0xffffffff, 0x100,
375 0x9490, 0xffffffff, 0x1,
376 0x949c, 0xffffffff, 0x100,
377 0x9490, 0xffffffff, 0x8000,
378 0x9604, 0xffffffff, 0x0,
379 0x9654, 0xffffffff, 0x100,
380 0x9604, 0xffffffff, 0x1,
381 0x9654, 0xffffffff, 0x100,
382 0x9604, 0xffffffff, 0x80000000,
383 0x9030, 0xffffffff, 0x100,
384 0x9034, 0xffffffff, 0x100,
385 0x9038, 0xffffffff, 0x100,
386 0x903c, 0xffffffff, 0x100,
387 0x9040, 0xffffffff, 0x100,
388 0xa200, 0xffffffff, 0x100,
389 0xa204, 0xffffffff, 0x100,
390 0xa208, 0xffffffff, 0x100,
391 0xa20c, 0xffffffff, 0x100,
392 0x971c, 0xffffffff, 0x100,
393 0x915c, 0xffffffff, 0x00020001,
394 0x9174, 0xffffffff, 0x00000003,
395 0x9178, 0xffffffff, 0x00050001,
396 0x917c, 0xffffffff, 0x00030002,
397 0x918c, 0xffffffff, 0x00000004,
398 0x9190, 0xffffffff, 0x00070006,
399 0x9194, 0xffffffff, 0x00050001,
400 0x9198, 0xffffffff, 0x00030002,
401 0x91a8, 0xffffffff, 0x00000004,
402 0x91ac, 0xffffffff, 0x00070006,
403 0x91e8, 0xffffffff, 0x00000001,
404 0x9294, 0xffffffff, 0x00000001,
405 0x929c, 0xffffffff, 0x00000002,
406 0x92a0, 0xffffffff, 0x00040003,
407 0x9150, 0xffffffff, 0x4d940000
411 0x3f90, 0x00ff0000, 0x00f00000,
412 0x9148, 0x00ff0000, 0x00f00000,
413 0x3f94, 0x00ff0000, 0x00f00000,
414 0x914c, 0x00ff0000, 0x00f00000,
415 0x900c, 0xffffffff, 0x003b033f,
416 0xb4c, 0x00000020, 0x00000020,
417 0xa180, 0xffffffff, 0x00003f3f
421 0x8bcc, 0xffffffff, 0x130300f9,
422 0x5448, 0xffffffff, 0x100,
423 0x55e4, 0xffffffff, 0x100,
424 0x160c, 0xffffffff, 0x100,
425 0x5644, 0xffffffff, 0x100,
426 0xc164, 0xffffffff, 0x100,
427 0x8a18, 0xffffffff, 0x100,
428 0x897c, 0xffffffff, 0x8000100,
429 0x8b28, 0xffffffff, 0x3c000100,
430 0x9144, 0xffffffff, 0x100,
431 0x9a1c, 0xffffffff, 0x10000,
432 0x9a50, 0xffffffff, 0x100,
433 0x9a1c, 0xffffffff, 0x10001,
434 0x9a50, 0xffffffff, 0x100,
435 0x9a1c, 0xffffffff, 0x0,
436 0x9870, 0xffffffff, 0x100,
437 0x8d58, 0xffffffff, 0x100,
438 0x9500, 0xffffffff, 0x0,
439 0x9510, 0xffffffff, 0x100,
440 0x9500, 0xffffffff, 0x1,
441 0x9510, 0xffffffff, 0x100,
442 0x9500, 0xffffffff, 0x2,
443 0x9510, 0xffffffff, 0x100,
444 0x9500, 0xffffffff, 0x3,
445 0x9510, 0xffffffff, 0x100,
446 0x9500, 0xffffffff, 0x4,
447 0x9510, 0xffffffff, 0x100,
448 0x9500, 0xffffffff, 0x5,
449 0x9510, 0xffffffff, 0x100,
450 0x9500, 0xffffffff, 0x6,
451 0x9510, 0xffffffff, 0x100,
452 0x9500, 0xffffffff, 0x7,
453 0x9510, 0xffffffff, 0x100,
454 0x9500, 0xffffffff, 0x8000,
455 0x9490, 0xffffffff, 0x0,
456 0x949c, 0xffffffff, 0x100,
457 0x9490, 0xffffffff, 0x1,
458 0x949c, 0xffffffff, 0x100,
459 0x9490, 0xffffffff, 0x2,
460 0x949c, 0xffffffff, 0x100,
461 0x9490, 0xffffffff, 0x3,
462 0x949c, 0xffffffff, 0x100,
463 0x9490, 0xffffffff, 0x4,
464 0x949c, 0xffffffff, 0x100,
465 0x9490, 0xffffffff, 0x5,
466 0x949c, 0xffffffff, 0x100,
467 0x9490, 0xffffffff, 0x6,
468 0x949c, 0xffffffff, 0x100,
469 0x9490, 0xffffffff, 0x7,
470 0x949c, 0xffffffff, 0x100,
471 0x9490, 0xffffffff, 0x8000,
472 0x9604, 0xffffffff, 0x0,
473 0x9654, 0xffffffff, 0x100,
474 0x9604, 0xffffffff, 0x1,
475 0x9654, 0xffffffff, 0x100,
476 0x9604, 0xffffffff, 0x2,
477 0x9654, 0xffffffff, 0x100,
478 0x9604, 0xffffffff, 0x3,
479 0x9654, 0xffffffff, 0x100,
480 0x9604, 0xffffffff, 0x4,
481 0x9654, 0xffffffff, 0x100,
482 0x9604, 0xffffffff, 0x5,
483 0x9654, 0xffffffff, 0x100,
484 0x9604, 0xffffffff, 0x6,
485 0x9654, 0xffffffff, 0x100,
486 0x9604, 0xffffffff, 0x7,
487 0x9654, 0xffffffff, 0x100,
488 0x9604, 0xffffffff, 0x80000000,
489 0x9030, 0xffffffff, 0x100,
490 0x9034, 0xffffffff, 0x100,
491 0x9038, 0xffffffff, 0x100,
492 0x903c, 0xffffffff, 0x100,
493 0x9040, 0xffffffff, 0x100,
494 0xa200, 0xffffffff, 0x100,
495 0xa204, 0xffffffff, 0x100,
496 0xa208, 0xffffffff, 0x100,
497 0xa20c, 0xffffffff, 0x100,
498 0x971c, 0xffffffff, 0x100,
499 0x915c, 0xffffffff, 0x00020001,
500 0x916c, 0xffffffff, 0x00040003,
501 0x9170, 0xffffffff, 0x00000005,
502 0x9178, 0xffffffff, 0x00050001,
503 0x917c, 0xffffffff, 0x00030002,
504 0x918c, 0xffffffff, 0x00000004,
505 0x9190, 0xffffffff, 0x00070006,
506 0x9194, 0xffffffff, 0x00050001,
507 0x9198, 0xffffffff, 0x00030002,
508 0x91a8, 0xffffffff, 0x00000004,
509 0x91ac, 0xffffffff, 0x00070006,
510 0x91b0, 0xffffffff, 0x00050001,
511 0x91b4, 0xffffffff, 0x00030002,
512 0x91c4, 0xffffffff, 0x00000004,
513 0x91c8, 0xffffffff, 0x00070006,
514 0x91cc, 0xffffffff, 0x00050001,
515 0x91d0, 0xffffffff, 0x00030002,
516 0x91e0, 0xffffffff, 0x00000004,
517 0x91e4, 0xffffffff, 0x00070006,
518 0x91e8, 0xffffffff, 0x00000001,
519 0x91ec, 0xffffffff, 0x00050001,
520 0x91f0, 0xffffffff, 0x00030002,
521 0x9200, 0xffffffff, 0x00000004,
522 0x9204, 0xffffffff, 0x00070006,
523 0x9208, 0xffffffff, 0x00050001,
524 0x920c, 0xffffffff, 0x00030002,
525 0x921c, 0xffffffff, 0x00000004,
526 0x9220, 0xffffffff, 0x00070006,
527 0x9224, 0xffffffff, 0x00050001,
528 0x9228, 0xffffffff, 0x00030002,
529 0x9238, 0xffffffff, 0x00000004,
530 0x923c, 0xffffffff, 0x00070006,
531 0x9240, 0xffffffff, 0x00050001,
532 0x9244, 0xffffffff, 0x00030002,
533 0x9254, 0xffffffff, 0x00000004,
534 0x9258, 0xffffffff, 0x00070006,
535 0x9294, 0xffffffff, 0x00000001,
536 0x929c, 0xffffffff, 0x00000002,
537 0x92a0, 0xffffffff, 0x00040003,
538 0x92a4, 0xffffffff, 0x00000005
542 0x88c4, 0xffffffff, 0x00000082,
543 0x28a50, 0xfffffffc, 0x00000004,
544 0x2650, 0x00040000, 0,
545 0x20bc, 0x00040000, 0,
546 0x733c, 0xffffffff, 0x00000002,
547 0x7300, 0xffffffff, 0x001000f0,
548 0x3f90, 0x00ff0000, 0,
549 0x9148, 0x00ff0000, 0,
550 0x3f94, 0x00ff0000, 0,
551 0x914c, 0x00ff0000, 0,
552 0x240c, 0xffffffff, 0x00000380,
553 0x8a14, 0x00000007, 0x00000007,
554 0x8b24, 0xffffffff, 0x00ff0fff,
555 0x28a4c, 0xffffffff, 0x00004000,
556 0xa180, 0xffffffff, 0x00003f3f,
557 0x8d00, 0xffffffff, 0x0e0e003a,
558 0x8d04, 0xffffffff, 0x013a0e2a,
559 0x8c00, 0xffffffff, 0xe400000f,
560 0x8db0, 0xffffffff, 0x98989898,
561 0x8db4, 0xffffffff, 0x98989898,
562 0x8db8, 0xffffffff, 0x98989898,
563 0x8dbc, 0xffffffff, 0x98989898,
564 0x8dc0, 0xffffffff, 0x98989898,
565 0x8dc4, 0xffffffff, 0x98989898,
566 0x8dc8, 0xffffffff, 0x98989898,
567 0x8dcc, 0xffffffff, 0x98989898,
568 0x9058, 0xffffffff, 0x0fffc40f,
569 0x900c, 0xffffffff, 0x003b033f,
570 0x28350, 0xffffffff, 0,
571 0x8cf0, 0x1fffffff, 0x08e00420,
572 0x9508, 0xffffffff, 0x00000002,
573 0x88c4, 0xffffffff, 0x000000c2,
574 0x9698, 0x18000000, 0x18000000
578 0x8bcc, 0xffffffff, 0x13030100,
579 0x5448, 0xffffffff, 0x100,
580 0x55e4, 0xffffffff, 0x100,
581 0x160c, 0xffffffff, 0x100,
582 0x5644, 0xffffffff, 0x100,
583 0xc164, 0xffffffff, 0x100,
584 0x8a18, 0xffffffff, 0x100,
585 0x897c, 0xffffffff, 0x100,
586 0x8b28, 0xffffffff, 0x100,
587 0x9144, 0xffffffff, 0x100,
588 0x9a1c, 0xffffffff, 0x10000,
589 0x9a50, 0xffffffff, 0x100,
590 0x9a1c, 0xffffffff, 0x10001,
591 0x9a50, 0xffffffff, 0x100,
592 0x9a1c, 0xffffffff, 0x10002,
593 0x9a50, 0xffffffff, 0x100,
594 0x9a1c, 0xffffffff, 0x10003,
595 0x9a50, 0xffffffff, 0x100,
596 0x9a1c, 0xffffffff, 0x0,
597 0x9870, 0xffffffff, 0x100,
598 0x8d58, 0xffffffff, 0x100,
599 0x9500, 0xffffffff, 0x0,
600 0x9510, 0xffffffff, 0x100,
601 0x9500, 0xffffffff, 0x1,
602 0x9510, 0xffffffff, 0x100,
603 0x9500, 0xffffffff, 0x2,
604 0x9510, 0xffffffff, 0x100,
605 0x9500, 0xffffffff, 0x3,
606 0x9510, 0xffffffff, 0x100,
607 0x9500, 0xffffffff, 0x4,
608 0x9510, 0xffffffff, 0x100,
609 0x9500, 0xffffffff, 0x5,
610 0x9510, 0xffffffff, 0x100,
611 0x9500, 0xffffffff, 0x6,
612 0x9510, 0xffffffff, 0x100,
613 0x9500, 0xffffffff, 0x7,
614 0x9510, 0xffffffff, 0x100,
615 0x9500, 0xffffffff, 0x8000,
616 0x9490, 0xffffffff, 0x0,
617 0x949c, 0xffffffff, 0x100,
618 0x9490, 0xffffffff, 0x1,
619 0x949c, 0xffffffff, 0x100,
620 0x9490, 0xffffffff, 0x2,
621 0x949c, 0xffffffff, 0x100,
622 0x9490, 0xffffffff, 0x3,
623 0x949c, 0xffffffff, 0x100,
624 0x9490, 0xffffffff, 0x4,
625 0x949c, 0xffffffff, 0x100,
626 0x9490, 0xffffffff, 0x5,
627 0x949c, 0xffffffff, 0x100,
628 0x9490, 0xffffffff, 0x6,
629 0x949c, 0xffffffff, 0x100,
630 0x9490, 0xffffffff, 0x7,
631 0x949c, 0xffffffff, 0x100,
632 0x9490, 0xffffffff, 0x8000,
633 0x9604, 0xffffffff, 0x0,
634 0x9654, 0xffffffff, 0x100,
635 0x9604, 0xffffffff, 0x1,
636 0x9654, 0xffffffff, 0x100,
637 0x9604, 0xffffffff, 0x2,
638 0x9654, 0xffffffff, 0x100,
639 0x9604, 0xffffffff, 0x3,
640 0x9654, 0xffffffff, 0x100,
641 0x9604, 0xffffffff, 0x4,
642 0x9654, 0xffffffff, 0x100,
643 0x9604, 0xffffffff, 0x5,
644 0x9654, 0xffffffff, 0x100,
645 0x9604, 0xffffffff, 0x6,
646 0x9654, 0xffffffff, 0x100,
647 0x9604, 0xffffffff, 0x7,
648 0x9654, 0xffffffff, 0x100,
649 0x9604, 0xffffffff, 0x80000000,
650 0x9030, 0xffffffff, 0x100,
651 0x9034, 0xffffffff, 0x100,
652 0x9038, 0xffffffff, 0x100,
653 0x903c, 0xffffffff, 0x100,
654 0x9040, 0xffffffff, 0x100,
655 0xa200, 0xffffffff, 0x100,
656 0xa204, 0xffffffff, 0x100,
657 0xa208, 0xffffffff, 0x100,
658 0xa20c, 0xffffffff, 0x100,
659 0x971c, 0xffffffff, 0x100,
660 0x915c, 0xffffffff, 0x00020001,
661 0x9160, 0xffffffff, 0x00040003,
662 0x916c, 0xffffffff, 0x00060005,
663 0x9170, 0xffffffff, 0x00080007,
664 0x9174, 0xffffffff, 0x000a0009,
665 0x9178, 0xffffffff, 0x000c000b,
666 0x917c, 0xffffffff, 0x000e000d,
667 0x9180, 0xffffffff, 0x0010000f,
668 0x918c, 0xffffffff, 0x00120011,
669 0x9190, 0xffffffff, 0x00140013,
670 0x9194, 0xffffffff, 0x00020001,
671 0x9198, 0xffffffff, 0x00040003,
672 0x919c, 0xffffffff, 0x00060005,
673 0x91a8, 0xffffffff, 0x00080007,
674 0x91ac, 0xffffffff, 0x000a0009,
675 0x91b0, 0xffffffff, 0x000c000b,
676 0x91b4, 0xffffffff, 0x000e000d,
677 0x91b8, 0xffffffff, 0x0010000f,
678 0x91c4, 0xffffffff, 0x00120011,
679 0x91c8, 0xffffffff, 0x00140013,
680 0x91cc, 0xffffffff, 0x00020001,
681 0x91d0, 0xffffffff, 0x00040003,
682 0x91d4, 0xffffffff, 0x00060005,
683 0x91e0, 0xffffffff, 0x00080007,
684 0x91e4, 0xffffffff, 0x000a0009,
685 0x91e8, 0xffffffff, 0x000c000b,
686 0x91ec, 0xffffffff, 0x00020001,
687 0x91f0, 0xffffffff, 0x00040003,
688 0x91f4, 0xffffffff, 0x00060005,
689 0x9200, 0xffffffff, 0x00080007,
690 0x9204, 0xffffffff, 0x000a0009,
691 0x9208, 0xffffffff, 0x000c000b,
692 0x920c, 0xffffffff, 0x000e000d,
693 0x9210, 0xffffffff, 0x0010000f,
694 0x921c, 0xffffffff, 0x00120011,
695 0x9220, 0xffffffff, 0x00140013,
696 0x9224, 0xffffffff, 0x00020001,
697 0x9228, 0xffffffff, 0x00040003,
698 0x922c, 0xffffffff, 0x00060005,
699 0x9238, 0xffffffff, 0x00080007,
700 0x923c, 0xffffffff, 0x000a0009,
701 0x9240, 0xffffffff, 0x000c000b,
702 0x9244, 0xffffffff, 0x000e000d,
703 0x9248, 0xffffffff, 0x0010000f,
704 0x9254, 0xffffffff, 0x00120011,
705 0x9258, 0xffffffff, 0x00140013,
706 0x9294, 0xffffffff, 0x00020001,
707 0x929c, 0xffffffff, 0x00040003,
708 0x92a0, 0xffffffff, 0x00060005,
709 0x92a4, 0xffffffff, 0x00080007
714 switch (rdev->family) { in rv770_init_golden_registers()
722 if (rdev->pdev->device == 0x994e) in rv770_init_golden_registers()
779 * rv770_get_xclk - get the xclk
784 * (r7xx-cayman).
788 u32 reference_clock = rdev->clock.spll.reference_freq; in rv770_get_xclk()
802 struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc_id]; in rv770_page_flip()
803 struct drm_framebuffer *fb = radeon_crtc->base.primary->fb; in rv770_page_flip()
804 u32 tmp = RREG32(AVIVO_D1GRPH_UPDATE + radeon_crtc->crtc_offset); in rv770_page_flip()
809 WREG32(AVIVO_D1GRPH_UPDATE + radeon_crtc->crtc_offset, tmp); in rv770_page_flip()
812 WREG32(AVIVO_D1GRPH_FLIP_CONTROL + radeon_crtc->crtc_offset, in rv770_page_flip()
813 async ? AVIVO_D1GRPH_SURFACE_UPDATE_H_RETRACE_EN : 0); in rv770_page_flip()
815 WREG32(AVIVO_D1GRPH_PITCH + radeon_crtc->crtc_offset, in rv770_page_flip()
816 fb->pitches[0] / fb->format->cpp[0]); in rv770_page_flip()
818 if (radeon_crtc->crtc_id) { in rv770_page_flip()
825 WREG32(D1GRPH_SECONDARY_SURFACE_ADDRESS + radeon_crtc->crtc_offset, in rv770_page_flip()
827 WREG32(D1GRPH_PRIMARY_SURFACE_ADDRESS + radeon_crtc->crtc_offset, in rv770_page_flip()
831 for (i = 0; i < rdev->usec_timeout; i++) { in rv770_page_flip()
832 if (RREG32(AVIVO_D1GRPH_UPDATE + radeon_crtc->crtc_offset) & AVIVO_D1GRPH_SURFACE_UPDATE_PENDING) in rv770_page_flip()
838 /* Unlock the lock, so double-buffering can take place inside vblank */ in rv770_page_flip()
840 WREG32(AVIVO_D1GRPH_UPDATE + radeon_crtc->crtc_offset, tmp); in rv770_page_flip()
845 struct radeon_crtc *radeon_crtc = rdev->mode_info.crtcs[crtc_id]; in rv770_page_flip_pending()
848 return !!(RREG32(AVIVO_D1GRPH_UPDATE + radeon_crtc->crtc_offset) & in rv770_page_flip_pending()
859 if (temp & 0x400) in rv770_get_temp()
860 actual_temp = -256; in rv770_get_temp()
861 else if (temp & 0x200) in rv770_get_temp()
863 else if (temp & 0x100) { in rv770_get_temp()
864 actual_temp = temp & 0x1ff; in rv770_get_temp()
865 actual_temp |= ~0x1ff; in rv770_get_temp()
867 actual_temp = temp & 0xff; in rv770_get_temp()
874 int req_ps_idx = rdev->pm.requested_power_state_index; in rv770_pm_misc()
875 int req_cm_idx = rdev->pm.requested_clock_mode_index; in rv770_pm_misc()
876 struct radeon_power_state *ps = &rdev->pm.power_state[req_ps_idx]; in rv770_pm_misc()
877 struct radeon_voltage *voltage = &ps->clock_info[req_cm_idx].voltage; in rv770_pm_misc()
879 if ((voltage->type == VOLTAGE_SW) && voltage->voltage) { in rv770_pm_misc()
880 /* 0xff01 is a flag rather then an actual voltage */ in rv770_pm_misc()
881 if (voltage->voltage == 0xff01) in rv770_pm_misc()
883 if (voltage->voltage != rdev->pm.current_vddc) { in rv770_pm_misc()
884 radeon_atom_set_voltage(rdev, voltage->voltage, SET_VOLTAGE_TYPE_ASIC_VDDC); in rv770_pm_misc()
885 rdev->pm.current_vddc = voltage->voltage; in rv770_pm_misc()
886 DRM_DEBUG("Setting: v: %d\n", voltage->voltage); in rv770_pm_misc()
899 if (rdev->gart.robj == NULL) { in rv770_pcie_gart_enable()
900 dev_err(rdev->dev, "No VRAM object for PCIE GART.\n"); in rv770_pcie_gart_enable()
901 return -EINVAL; in rv770_pcie_gart_enable()
910 WREG32(VM_L2_CNTL2, 0); in rv770_pcie_gart_enable()
911 WREG32(VM_L2_CNTL3, BANK_SELECT(0) | CACHE_UPDATE_MODE(2)); in rv770_pcie_gart_enable()
920 if (rdev->family == CHIP_RV740) in rv770_pcie_gart_enable()
926 WREG32(VM_CONTEXT0_PAGE_TABLE_START_ADDR, rdev->mc.gtt_start >> 12); in rv770_pcie_gart_enable()
927 WREG32(VM_CONTEXT0_PAGE_TABLE_END_ADDR, rdev->mc.gtt_end >> 12); in rv770_pcie_gart_enable()
928 WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR, rdev->gart.table_addr >> 12); in rv770_pcie_gart_enable()
929 WREG32(VM_CONTEXT0_CNTL, ENABLE_CONTEXT | PAGE_TABLE_DEPTH(0) | in rv770_pcie_gart_enable()
932 (u32)(rdev->dummy_page.addr >> 12)); in rv770_pcie_gart_enable()
934 WREG32(VM_CONTEXT0_CNTL + (i * 4), 0); in rv770_pcie_gart_enable()
937 DRM_INFO("PCIE GART of %uM enabled (table at 0x%016llX).\n", in rv770_pcie_gart_enable()
938 (unsigned)(rdev->mc.gtt_size >> 20), in rv770_pcie_gart_enable()
939 (unsigned long long)rdev->gart.table_addr); in rv770_pcie_gart_enable()
940 rdev->gart.ready = true; in rv770_pcie_gart_enable()
941 return 0; in rv770_pcie_gart_enable()
950 for (i = 0; i < 7; i++) in rv770_pcie_gart_disable()
951 WREG32(VM_CONTEXT0_CNTL + (i * 4), 0); in rv770_pcie_gart_disable()
956 WREG32(VM_L2_CNTL2, 0); in rv770_pcie_gart_disable()
957 WREG32(VM_L2_CNTL3, BANK_SELECT(0) | CACHE_UPDATE_MODE(2)); in rv770_pcie_gart_disable()
987 WREG32(VM_L2_CNTL2, 0); in rv770_agp_enable()
988 WREG32(VM_L2_CNTL3, BANK_SELECT(0) | CACHE_UPDATE_MODE(2)); in rv770_agp_enable()
1001 for (i = 0; i < 7; i++) in rv770_agp_enable()
1002 WREG32(VM_CONTEXT0_CNTL + (i * 4), 0); in rv770_agp_enable()
1012 for (i = 0, j = 0; i < 32; i++, j += 0x18) { in rv770_mc_program()
1013 WREG32((0x2c14 + j), 0x00000000); in rv770_mc_program()
1014 WREG32((0x2c18 + j), 0x00000000); in rv770_mc_program()
1015 WREG32((0x2c1c + j), 0x00000000); in rv770_mc_program()
1016 WREG32((0x2c20 + j), 0x00000000); in rv770_mc_program()
1017 WREG32((0x2c24 + j), 0x00000000); in rv770_mc_program()
1026 dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); in rv770_mc_program()
1031 if (rdev->flags & RADEON_IS_AGP) { in rv770_mc_program()
1032 if (rdev->mc.vram_start < rdev->mc.gtt_start) { in rv770_mc_program()
1035 rdev->mc.vram_start >> 12); in rv770_mc_program()
1037 rdev->mc.gtt_end >> 12); in rv770_mc_program()
1041 rdev->mc.gtt_start >> 12); in rv770_mc_program()
1043 rdev->mc.vram_end >> 12); in rv770_mc_program()
1047 rdev->mc.vram_start >> 12); in rv770_mc_program()
1049 rdev->mc.vram_end >> 12); in rv770_mc_program()
1051 WREG32(MC_VM_SYSTEM_APERTURE_DEFAULT_ADDR, rdev->vram_scratch.gpu_addr >> 12); in rv770_mc_program()
1052 tmp = ((rdev->mc.vram_end >> 24) & 0xFFFF) << 16; in rv770_mc_program()
1053 tmp |= ((rdev->mc.vram_start >> 24) & 0xFFFF); in rv770_mc_program()
1055 WREG32(HDP_NONSURFACE_BASE, (rdev->mc.vram_start >> 8)); in rv770_mc_program()
1057 WREG32(HDP_NONSURFACE_SIZE, 0x3FFFFFFF); in rv770_mc_program()
1058 if (rdev->flags & RADEON_IS_AGP) { in rv770_mc_program()
1059 WREG32(MC_VM_AGP_TOP, rdev->mc.gtt_end >> 16); in rv770_mc_program()
1060 WREG32(MC_VM_AGP_BOT, rdev->mc.gtt_start >> 16); in rv770_mc_program()
1061 WREG32(MC_VM_AGP_BASE, rdev->mc.agp_base >> 22); in rv770_mc_program()
1063 WREG32(MC_VM_AGP_BASE, 0); in rv770_mc_program()
1064 WREG32(MC_VM_AGP_TOP, 0x0FFFFFFF); in rv770_mc_program()
1065 WREG32(MC_VM_AGP_BOT, 0x0FFFFFFF); in rv770_mc_program()
1068 dev_warn(rdev->dev, "Wait for MC idle timedout !\n"); in rv770_mc_program()
1082 if (rdev->asic->copy.copy_ring_index == RADEON_RING_TYPE_GFX_INDEX) in r700_cp_stop()
1083 radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size); in r700_cp_stop()
1085 WREG32(SCRATCH_UMSK, 0); in r700_cp_stop()
1086 rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready = false; in r700_cp_stop()
1094 if (!rdev->me_fw || !rdev->pfp_fw) in rv770_cp_load_microcode()
1095 return -EINVAL; in rv770_cp_load_microcode()
1108 WREG32(GRBM_SOFT_RESET, 0); in rv770_cp_load_microcode()
1110 fw_data = (const __be32 *)rdev->pfp_fw->data; in rv770_cp_load_microcode()
1111 WREG32(CP_PFP_UCODE_ADDR, 0); in rv770_cp_load_microcode()
1112 for (i = 0; i < R700_PFP_UCODE_SIZE; i++) in rv770_cp_load_microcode()
1114 WREG32(CP_PFP_UCODE_ADDR, 0); in rv770_cp_load_microcode()
1116 fw_data = (const __be32 *)rdev->me_fw->data; in rv770_cp_load_microcode()
1117 WREG32(CP_ME_RAM_WADDR, 0); in rv770_cp_load_microcode()
1118 for (i = 0; i < R700_PM4_UCODE_SIZE; i++) in rv770_cp_load_microcode()
1121 WREG32(CP_PFP_UCODE_ADDR, 0); in rv770_cp_load_microcode()
1122 WREG32(CP_ME_RAM_WADDR, 0); in rv770_cp_load_microcode()
1123 WREG32(CP_ME_RAM_RADDR, 0); in rv770_cp_load_microcode()
1124 return 0; in rv770_cp_load_microcode()
1129 struct radeon_ring *ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX]; in r700_cp_fini()
1132 radeon_scratch_free(rdev, ring->rptr_save_reg); in r700_cp_fini()
1139 if (rdev->flags & RADEON_IS_IGP) in rv770_set_clk_bypass_mode()
1147 for (i = 0; i < rdev->usec_timeout; i++) { in rv770_set_clk_bypass_mode()
1157 if ((rdev->family == CHIP_RV710) || (rdev->family == CHIP_RV730)) in rv770_set_clk_bypass_mode()
1176 u32 gs_prim_buffer_depth = 0; in rv770_gpu_init()
1182 u32 gb_tiling_config = 0; in rv770_gpu_init()
1183 u32 cc_gc_shader_pipe_config = 0; in rv770_gpu_init()
1191 rdev->config.rv770.tiling_group_size = 256; in rv770_gpu_init()
1192 switch (rdev->family) { in rv770_gpu_init()
1194 rdev->config.rv770.max_pipes = 4; in rv770_gpu_init()
1195 rdev->config.rv770.max_tile_pipes = 8; in rv770_gpu_init()
1196 rdev->config.rv770.max_simds = 10; in rv770_gpu_init()
1197 rdev->config.rv770.max_backends = 4; in rv770_gpu_init()
1198 rdev->config.rv770.max_gprs = 256; in rv770_gpu_init()
1199 rdev->config.rv770.max_threads = 248; in rv770_gpu_init()
1200 rdev->config.rv770.max_stack_entries = 512; in rv770_gpu_init()
1201 rdev->config.rv770.max_hw_contexts = 8; in rv770_gpu_init()
1202 rdev->config.rv770.max_gs_threads = 16 * 2; in rv770_gpu_init()
1203 rdev->config.rv770.sx_max_export_size = 128; in rv770_gpu_init()
1204 rdev->config.rv770.sx_max_export_pos_size = 16; in rv770_gpu_init()
1205 rdev->config.rv770.sx_max_export_smx_size = 112; in rv770_gpu_init()
1206 rdev->config.rv770.sq_num_cf_insts = 2; in rv770_gpu_init()
1208 rdev->config.rv770.sx_num_of_sets = 7; in rv770_gpu_init()
1209 rdev->config.rv770.sc_prim_fifo_size = 0xF9; in rv770_gpu_init()
1210 rdev->config.rv770.sc_hiz_tile_fifo_size = 0x30; in rv770_gpu_init()
1211 rdev->config.rv770.sc_earlyz_tile_fifo_fize = 0x130; in rv770_gpu_init()
1214 rdev->config.rv770.max_pipes = 2; in rv770_gpu_init()
1215 rdev->config.rv770.max_tile_pipes = 4; in rv770_gpu_init()
1216 rdev->config.rv770.max_simds = 8; in rv770_gpu_init()
1217 rdev->config.rv770.max_backends = 2; in rv770_gpu_init()
1218 rdev->config.rv770.max_gprs = 128; in rv770_gpu_init()
1219 rdev->config.rv770.max_threads = 248; in rv770_gpu_init()
1220 rdev->config.rv770.max_stack_entries = 256; in rv770_gpu_init()
1221 rdev->config.rv770.max_hw_contexts = 8; in rv770_gpu_init()
1222 rdev->config.rv770.max_gs_threads = 16 * 2; in rv770_gpu_init()
1223 rdev->config.rv770.sx_max_export_size = 256; in rv770_gpu_init()
1224 rdev->config.rv770.sx_max_export_pos_size = 32; in rv770_gpu_init()
1225 rdev->config.rv770.sx_max_export_smx_size = 224; in rv770_gpu_init()
1226 rdev->config.rv770.sq_num_cf_insts = 2; in rv770_gpu_init()
1228 rdev->config.rv770.sx_num_of_sets = 7; in rv770_gpu_init()
1229 rdev->config.rv770.sc_prim_fifo_size = 0xf9; in rv770_gpu_init()
1230 rdev->config.rv770.sc_hiz_tile_fifo_size = 0x30; in rv770_gpu_init()
1231 rdev->config.rv770.sc_earlyz_tile_fifo_fize = 0x130; in rv770_gpu_init()
1232 if (rdev->config.rv770.sx_max_export_pos_size > 16) { in rv770_gpu_init()
1233 rdev->config.rv770.sx_max_export_pos_size -= 16; in rv770_gpu_init()
1234 rdev->config.rv770.sx_max_export_smx_size += 16; in rv770_gpu_init()
1238 rdev->config.rv770.max_pipes = 2; in rv770_gpu_init()
1239 rdev->config.rv770.max_tile_pipes = 2; in rv770_gpu_init()
1240 rdev->config.rv770.max_simds = 2; in rv770_gpu_init()
1241 rdev->config.rv770.max_backends = 1; in rv770_gpu_init()
1242 rdev->config.rv770.max_gprs = 256; in rv770_gpu_init()
1243 rdev->config.rv770.max_threads = 192; in rv770_gpu_init()
1244 rdev->config.rv770.max_stack_entries = 256; in rv770_gpu_init()
1245 rdev->config.rv770.max_hw_contexts = 4; in rv770_gpu_init()
1246 rdev->config.rv770.max_gs_threads = 8 * 2; in rv770_gpu_init()
1247 rdev->config.rv770.sx_max_export_size = 128; in rv770_gpu_init()
1248 rdev->config.rv770.sx_max_export_pos_size = 16; in rv770_gpu_init()
1249 rdev->config.rv770.sx_max_export_smx_size = 112; in rv770_gpu_init()
1250 rdev->config.rv770.sq_num_cf_insts = 1; in rv770_gpu_init()
1252 rdev->config.rv770.sx_num_of_sets = 7; in rv770_gpu_init()
1253 rdev->config.rv770.sc_prim_fifo_size = 0x40; in rv770_gpu_init()
1254 rdev->config.rv770.sc_hiz_tile_fifo_size = 0x30; in rv770_gpu_init()
1255 rdev->config.rv770.sc_earlyz_tile_fifo_fize = 0x130; in rv770_gpu_init()
1258 rdev->config.rv770.max_pipes = 4; in rv770_gpu_init()
1259 rdev->config.rv770.max_tile_pipes = 4; in rv770_gpu_init()
1260 rdev->config.rv770.max_simds = 8; in rv770_gpu_init()
1261 rdev->config.rv770.max_backends = 4; in rv770_gpu_init()
1262 rdev->config.rv770.max_gprs = 256; in rv770_gpu_init()
1263 rdev->config.rv770.max_threads = 248; in rv770_gpu_init()
1264 rdev->config.rv770.max_stack_entries = 512; in rv770_gpu_init()
1265 rdev->config.rv770.max_hw_contexts = 8; in rv770_gpu_init()
1266 rdev->config.rv770.max_gs_threads = 16 * 2; in rv770_gpu_init()
1267 rdev->config.rv770.sx_max_export_size = 256; in rv770_gpu_init()
1268 rdev->config.rv770.sx_max_export_pos_size = 32; in rv770_gpu_init()
1269 rdev->config.rv770.sx_max_export_smx_size = 224; in rv770_gpu_init()
1270 rdev->config.rv770.sq_num_cf_insts = 2; in rv770_gpu_init()
1272 rdev->config.rv770.sx_num_of_sets = 7; in rv770_gpu_init()
1273 rdev->config.rv770.sc_prim_fifo_size = 0x100; in rv770_gpu_init()
1274 rdev->config.rv770.sc_hiz_tile_fifo_size = 0x30; in rv770_gpu_init()
1275 rdev->config.rv770.sc_earlyz_tile_fifo_fize = 0x130; in rv770_gpu_init()
1277 if (rdev->config.rv770.sx_max_export_pos_size > 16) { in rv770_gpu_init()
1278 rdev->config.rv770.sx_max_export_pos_size -= 16; in rv770_gpu_init()
1279 rdev->config.rv770.sx_max_export_smx_size += 16; in rv770_gpu_init()
1287 j = 0; in rv770_gpu_init()
1288 for (i = 0; i < 32; i++) { in rv770_gpu_init()
1289 WREG32((0x2c14 + j), 0x00000000); in rv770_gpu_init()
1290 WREG32((0x2c18 + j), 0x00000000); in rv770_gpu_init()
1291 WREG32((0x2c1c + j), 0x00000000); in rv770_gpu_init()
1292 WREG32((0x2c20 + j), 0x00000000); in rv770_gpu_init()
1293 WREG32((0x2c24 + j), 0x00000000); in rv770_gpu_init()
1294 j += 0x18; in rv770_gpu_init()
1297 WREG32(GRBM_CNTL, GRBM_READ_TIMEOUT(0xff)); in rv770_gpu_init()
1304 for (i = 0, tmp = 1, active_number = 0; i < R7XX_MAX_PIPES; i++) { in rv770_gpu_init()
1313 WREG32(SPI_CONFIG_CNTL, 0); in rv770_gpu_init()
1316 cc_gc_shader_pipe_config = RREG32(CC_GC_SHADER_PIPE_CONFIG) & 0xffffff00; in rv770_gpu_init()
1317 tmp = rdev->config.rv770.max_simds - in rv770_gpu_init()
1319 rdev->config.rv770.active_simds = tmp; in rv770_gpu_init()
1321 switch (rdev->config.rv770.max_tile_pipes) { in rv770_gpu_init()
1324 gb_tiling_config = PIPE_TILING(0); in rv770_gpu_init()
1336 rdev->config.rv770.tiling_npipes = rdev->config.rv770.max_tile_pipes; in rv770_gpu_init()
1339 tmp = 0; in rv770_gpu_init()
1340 for (i = 0; i < rdev->config.rv770.max_backends; i++) in rv770_gpu_init()
1344 for (i = 0; i < rdev->config.rv770.max_backends; i++) in rv770_gpu_init()
1348 tmp = r6xx_remap_render_backend(rdev, tmp, rdev->config.rv770.max_backends, in rv770_gpu_init()
1351 rdev->config.rv770.backend_map = tmp; in rv770_gpu_init()
1353 if (rdev->family == CHIP_RV770) in rv770_gpu_init()
1359 gb_tiling_config |= BANK_TILING(0); in rv770_gpu_init()
1361 rdev->config.rv770.tiling_nbanks = 4 << ((gb_tiling_config >> 4) & 0x3); in rv770_gpu_init()
1374 rdev->config.rv770.tile_config = gb_tiling_config; in rv770_gpu_init()
1377 WREG32(DCP_TILING_CONFIG, (gb_tiling_config & 0xffff)); in rv770_gpu_init()
1378 WREG32(HDP_TILING_CONFIG, (gb_tiling_config & 0xffff)); in rv770_gpu_init()
1379 WREG32(DMA_TILING_CONFIG, (gb_tiling_config & 0xffff)); in rv770_gpu_init()
1380 WREG32(DMA_TILING_CONFIG2, (gb_tiling_config & 0xffff)); in rv770_gpu_init()
1381 if (rdev->family == CHIP_RV730) { in rv770_gpu_init()
1382 WREG32(UVD_UDEC_DB_TILING_CONFIG, (gb_tiling_config & 0xffff)); in rv770_gpu_init()
1383 WREG32(UVD_UDEC_DBW_TILING_CONFIG, (gb_tiling_config & 0xffff)); in rv770_gpu_init()
1384 WREG32(UVD_UDEC_TILING_CONFIG, (gb_tiling_config & 0xffff)); in rv770_gpu_init()
1387 WREG32(CGTS_SYS_TCC_DISABLE, 0); in rv770_gpu_init()
1388 WREG32(CGTS_TCC_DISABLE, 0); in rv770_gpu_init()
1389 WREG32(CGTS_USER_SYS_TCC_DISABLE, 0); in rv770_gpu_init()
1390 WREG32(CGTS_USER_TCC_DISABLE, 0); in rv770_gpu_init()
1393 …num_qd_pipes = R7XX_MAX_PIPES - r600_count_pipe_bits((cc_gc_shader_pipe_config & INACTIVE_QD_PIPES… in rv770_gpu_init()
1395 WREG32(VGT_VERTEX_REUSE_BLOCK_CNTL, ((num_qd_pipes * 4) - 2) & VTX_REUSE_DEPTH_MASK); in rv770_gpu_init()
1398 WREG32(CP_QUEUE_THRESHOLDS, (ROQ_IB1_START(0x16) | in rv770_gpu_init()
1399 ROQ_IB2_START(0x2b))); in rv770_gpu_init()
1401 WREG32(CP_MEQ_THRESHOLDS, STQ_SPLIT(0x30)); in rv770_gpu_init()
1411 smx_dc_ctl0 &= ~CACHE_DEPTH(0x1ff); in rv770_gpu_init()
1412 smx_dc_ctl0 |= CACHE_DEPTH((rdev->config.rv770.sx_num_of_sets * 64) - 1); in rv770_gpu_init()
1415 if (rdev->family != CHIP_RV740) in rv770_gpu_init()
1421 if (rdev->family != CHIP_RV770) in rv770_gpu_init()
1422 WREG32(SMX_SAR_CTL0, 0x00003f3f); in rv770_gpu_init()
1425 db_debug3 &= ~DB_CLK_OFF_DELAY(0x1f); in rv770_gpu_init()
1426 switch (rdev->family) { in rv770_gpu_init()
1429 db_debug3 |= DB_CLK_OFF_DELAY(0x1f); in rv770_gpu_init()
1439 if (rdev->family != CHIP_RV770) { in rv770_gpu_init()
1445 …WREG32(SX_EXPORT_BUFFER_SIZES, (COLOR_BUFFER_SIZE((rdev->config.rv770.sx_max_export_size / 4) - 1)… in rv770_gpu_init()
1446 POSITION_BUFFER_SIZE((rdev->config.rv770.sx_max_export_pos_size / 4) - 1) | in rv770_gpu_init()
1447 SMX_BUFFER_SIZE((rdev->config.rv770.sx_max_export_smx_size / 4) - 1))); in rv770_gpu_init()
1449 WREG32(PA_SC_FIFO_SIZE, (SC_PRIM_FIFO_SIZE(rdev->config.rv770.sc_prim_fifo_size) | in rv770_gpu_init()
1450 SC_HIZ_TILE_FIFO_SIZE(rdev->config.rv770.sc_hiz_tile_fifo_size) | in rv770_gpu_init()
1451 SC_EARLYZ_TILE_FIFO_SIZE(rdev->config.rv770.sc_earlyz_tile_fifo_fize))); in rv770_gpu_init()
1453 WREG32(PA_SC_MULTI_CHIP_CNTL, 0); in rv770_gpu_init()
1459 WREG32(CP_PERFMON_CNTL, 0); in rv770_gpu_init()
1461 sq_ms_fifo_sizes = (CACHE_FIFO_SIZE(16 * rdev->config.rv770.sq_num_cf_insts) | in rv770_gpu_init()
1462 DONE_FIFO_HIWATER(0xe0) | in rv770_gpu_init()
1463 ALU_UPDATE_FIFO_HIWATER(0x8)); in rv770_gpu_init()
1464 switch (rdev->family) { in rv770_gpu_init()
1468 sq_ms_fifo_sizes |= FETCH_FIFO_HIWATER(0x1); in rv770_gpu_init()
1472 sq_ms_fifo_sizes |= FETCH_FIFO_HIWATER(0x4); in rv770_gpu_init()
1488 PS_PRIO(0) | in rv770_gpu_init()
1492 if (rdev->family == CHIP_RV710) in rv770_gpu_init()
1498 WREG32(SQ_GPR_RESOURCE_MGMT_1, (NUM_PS_GPRS((rdev->config.rv770.max_gprs * 24)/64) | in rv770_gpu_init()
1499 NUM_VS_GPRS((rdev->config.rv770.max_gprs * 24)/64) | in rv770_gpu_init()
1500 NUM_CLAUSE_TEMP_GPRS(((rdev->config.rv770.max_gprs * 24)/64)/2))); in rv770_gpu_init()
1502 WREG32(SQ_GPR_RESOURCE_MGMT_2, (NUM_GS_GPRS((rdev->config.rv770.max_gprs * 7)/64) | in rv770_gpu_init()
1503 NUM_ES_GPRS((rdev->config.rv770.max_gprs * 7)/64))); in rv770_gpu_init()
1505 sq_thread_resource_mgmt = (NUM_PS_THREADS((rdev->config.rv770.max_threads * 4)/8) | in rv770_gpu_init()
1506 NUM_VS_THREADS((rdev->config.rv770.max_threads * 2)/8) | in rv770_gpu_init()
1507 NUM_ES_THREADS((rdev->config.rv770.max_threads * 1)/8)); in rv770_gpu_init()
1508 if (((rdev->config.rv770.max_threads * 1) / 8) > rdev->config.rv770.max_gs_threads) in rv770_gpu_init()
1509 sq_thread_resource_mgmt |= NUM_GS_THREADS(rdev->config.rv770.max_gs_threads); in rv770_gpu_init()
1511 sq_thread_resource_mgmt |= NUM_GS_THREADS((rdev->config.rv770.max_gs_threads * 1)/8); in rv770_gpu_init()
1514 …WREG32(SQ_STACK_RESOURCE_MGMT_1, (NUM_PS_STACK_ENTRIES((rdev->config.rv770.max_stack_entries * 1)/… in rv770_gpu_init()
1515 NUM_VS_STACK_ENTRIES((rdev->config.rv770.max_stack_entries * 1)/4))); in rv770_gpu_init()
1517 …WREG32(SQ_STACK_RESOURCE_MGMT_2, (NUM_GS_STACK_ENTRIES((rdev->config.rv770.max_stack_entries * 1)/… in rv770_gpu_init()
1518 NUM_ES_STACK_ENTRIES((rdev->config.rv770.max_stack_entries * 1)/4))); in rv770_gpu_init()
1520 sq_dyn_gpr_size_simd_ab_0 = (SIMDA_RING0((rdev->config.rv770.max_gprs * 38)/64) | in rv770_gpu_init()
1521 SIMDA_RING1((rdev->config.rv770.max_gprs * 38)/64) | in rv770_gpu_init()
1522 SIMDB_RING0((rdev->config.rv770.max_gprs * 38)/64) | in rv770_gpu_init()
1523 SIMDB_RING1((rdev->config.rv770.max_gprs * 38)/64)); in rv770_gpu_init()
1537 if (rdev->family == CHIP_RV710) in rv770_gpu_init()
1544 switch (rdev->family) { in rv770_gpu_init()
1557 num_gs_verts_per_thread = rdev->config.rv770.max_pipes * 16; in rv770_gpu_init()
1569 WREG32(PA_SC_LINE_STIPPLE_STATE, 0); in rv770_gpu_init()
1570 WREG32(VGT_STRMOUT_EN, 0); in rv770_gpu_init()
1571 WREG32(SX_MISC, 0); in rv770_gpu_init()
1572 WREG32(PA_SC_MODE_CNTL, 0); in rv770_gpu_init()
1573 WREG32(PA_SC_EDGERULE, 0xaaaaaaaa); in rv770_gpu_init()
1574 WREG32(PA_SC_AA_CONFIG, 0); in rv770_gpu_init()
1575 WREG32(PA_SC_CLIPRECT_RULE, 0xffff); in rv770_gpu_init()
1576 WREG32(PA_SC_LINE_STIPPLE, 0); in rv770_gpu_init()
1577 WREG32(SPI_INPUT_Z, 0); in rv770_gpu_init()
1579 WREG32(CB_COLOR7_FRAG, 0); in rv770_gpu_init()
1582 WREG32(CB_COLOR0_BASE, 0); in rv770_gpu_init()
1583 WREG32(CB_COLOR1_BASE, 0); in rv770_gpu_init()
1584 WREG32(CB_COLOR2_BASE, 0); in rv770_gpu_init()
1585 WREG32(CB_COLOR3_BASE, 0); in rv770_gpu_init()
1586 WREG32(CB_COLOR4_BASE, 0); in rv770_gpu_init()
1587 WREG32(CB_COLOR5_BASE, 0); in rv770_gpu_init()
1588 WREG32(CB_COLOR6_BASE, 0); in rv770_gpu_init()
1589 WREG32(CB_COLOR7_BASE, 0); in rv770_gpu_init()
1591 WREG32(TCP_CNTL, 0); in rv770_gpu_init()
1596 WREG32(PA_SC_MULTI_CHIP_CNTL, 0); in rv770_gpu_init()
1600 WREG32(VC_ENHANCE, 0); in rv770_gpu_init()
1607 if (mc->mc_vram_size > 0xE0000000) { in r700_vram_gtt_location()
1609 dev_warn(rdev->dev, "limiting VRAM\n"); in r700_vram_gtt_location()
1610 mc->real_vram_size = 0xE0000000; in r700_vram_gtt_location()
1611 mc->mc_vram_size = 0xE0000000; in r700_vram_gtt_location()
1613 if (rdev->flags & RADEON_IS_AGP) { in r700_vram_gtt_location()
1614 size_bf = mc->gtt_start; in r700_vram_gtt_location()
1615 size_af = mc->mc_mask - mc->gtt_end; in r700_vram_gtt_location()
1617 if (mc->mc_vram_size > size_bf) { in r700_vram_gtt_location()
1618 dev_warn(rdev->dev, "limiting VRAM\n"); in r700_vram_gtt_location()
1619 mc->real_vram_size = size_bf; in r700_vram_gtt_location()
1620 mc->mc_vram_size = size_bf; in r700_vram_gtt_location()
1622 mc->vram_start = mc->gtt_start - mc->mc_vram_size; in r700_vram_gtt_location()
1624 if (mc->mc_vram_size > size_af) { in r700_vram_gtt_location()
1625 dev_warn(rdev->dev, "limiting VRAM\n"); in r700_vram_gtt_location()
1626 mc->real_vram_size = size_af; in r700_vram_gtt_location()
1627 mc->mc_vram_size = size_af; in r700_vram_gtt_location()
1629 mc->vram_start = mc->gtt_end + 1; in r700_vram_gtt_location()
1631 mc->vram_end = mc->vram_start + mc->mc_vram_size - 1; in r700_vram_gtt_location()
1632 dev_info(rdev->dev, "VRAM: %lluM 0x%08llX - 0x%08llX (%lluM used)\n", in r700_vram_gtt_location()
1633 mc->mc_vram_size >> 20, mc->vram_start, in r700_vram_gtt_location()
1634 mc->vram_end, mc->real_vram_size >> 20); in r700_vram_gtt_location()
1636 radeon_vram_location(rdev, &rdev->mc, 0); in r700_vram_gtt_location()
1637 rdev->mc.gtt_base_align = 0; in r700_vram_gtt_location()
1648 rdev->mc.vram_is_ddr = true; in rv770_mc_init()
1659 case 0: in rv770_mc_init()
1673 rdev->mc.vram_width = numchan * chansize; in rv770_mc_init()
1674 /* Could aper size report 0 ? */ in rv770_mc_init()
1675 rdev->mc.aper_base = pci_resource_start(rdev->pdev, 0); in rv770_mc_init()
1676 rdev->mc.aper_size = pci_resource_len(rdev->pdev, 0); in rv770_mc_init()
1678 rdev->mc.mc_vram_size = RREG32(CONFIG_MEMSIZE); in rv770_mc_init()
1679 rdev->mc.real_vram_size = RREG32(CONFIG_MEMSIZE); in rv770_mc_init()
1680 rdev->mc.visible_vram_size = rdev->mc.aper_size; in rv770_mc_init()
1681 r700_vram_gtt_location(rdev, &rdev->mc); in rv770_mc_init()
1684 return 0; in rv770_mc_init()
1691 if (!rdev->has_uvd) in rv770_uvd_init()
1696 dev_err(rdev->dev, "failed UVD (%d) init.\n", r); in rv770_uvd_init()
1698 * At this point rdev->uvd.vcpu_bo is NULL which trickles down in rv770_uvd_init()
1703 rdev->has_uvd = false; in rv770_uvd_init()
1706 rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_obj = NULL; in rv770_uvd_init()
1707 r600_ring_init(rdev, &rdev->ring[R600_RING_TYPE_UVD_INDEX], 4096); in rv770_uvd_init()
1714 if (!rdev->has_uvd) in rv770_uvd_start()
1719 dev_err(rdev->dev, "failed UVD resume (%d).\n", r); in rv770_uvd_start()
1724 dev_err(rdev->dev, "failed initializing UVD fences (%d).\n", r); in rv770_uvd_start()
1730 rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_size = 0; in rv770_uvd_start()
1738 if (!rdev->has_uvd || !rdev->ring[R600_RING_TYPE_UVD_INDEX].ring_size) in rv770_uvd_resume()
1741 ring = &rdev->ring[R600_RING_TYPE_UVD_INDEX]; in rv770_uvd_resume()
1742 r = radeon_ring_init(rdev, ring, ring->ring_size, 0, PACKET0(UVD_NO_OP, 0)); in rv770_uvd_resume()
1744 dev_err(rdev->dev, "failed initializing UVD ring (%d).\n", r); in rv770_uvd_resume()
1749 dev_err(rdev->dev, "failed initializing UVD (%d).\n", r); in rv770_uvd_resume()
1769 if (rdev->flags & RADEON_IS_AGP) { in rv770_startup()
1786 dev_err(rdev->dev, "failed initializing CP fences (%d).\n", r); in rv770_startup()
1792 dev_err(rdev->dev, "failed initializing DMA fences (%d).\n", r); in rv770_startup()
1799 if (!rdev->irq.installed) { in rv770_startup()
1813 ring = &rdev->ring[RADEON_RING_TYPE_GFX_INDEX]; in rv770_startup()
1814 r = radeon_ring_init(rdev, ring, ring->ring_size, RADEON_WB_CP_RPTR_OFFSET, in rv770_startup()
1819 ring = &rdev->ring[R600_RING_TYPE_DMA_INDEX]; in rv770_startup()
1820 r = radeon_ring_init(rdev, ring, ring->ring_size, R600_WB_DMA_RPTR_OFFSET, in rv770_startup()
1821 DMA_PACKET(DMA_PACKET_NOP, 0, 0, 0)); in rv770_startup()
1840 dev_err(rdev->dev, "IB initialization failed (%d).\n", r); in rv770_startup()
1850 return 0; in rv770_startup()
1862 atom_asic_init(rdev->mode_info.atom_context); in rv770_resume()
1867 if (rdev->pm.pm_method == PM_METHOD_DPM) in rv770_resume()
1870 rdev->accel_working = true; in rv770_resume()
1874 rdev->accel_working = false; in rv770_resume()
1886 if (rdev->has_uvd) { in rv770_suspend()
1896 return 0; in rv770_suspend()
1912 return -EINVAL; in rv770_init()
1915 if (!rdev->is_atom_bios) { in rv770_init()
1916 dev_err(rdev->dev, "Expecting atombios for R600 GPU\n"); in rv770_init()
1917 return -EINVAL; in rv770_init()
1924 if (!rdev->bios) { in rv770_init()
1925 dev_err(rdev->dev, "Card not posted and no BIOS - ignoring\n"); in rv770_init()
1926 return -EINVAL; in rv770_init()
1929 atom_asic_init(rdev->mode_info.atom_context); in rv770_init()
1942 if (rdev->flags & RADEON_IS_AGP) { in rv770_init()
1955 if (!rdev->me_fw || !rdev->pfp_fw || !rdev->rlc_fw) { in rv770_init()
1966 rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ring_obj = NULL; in rv770_init()
1967 r600_ring_init(rdev, &rdev->ring[RADEON_RING_TYPE_GFX_INDEX], 1024 * 1024); in rv770_init()
1969 rdev->ring[R600_RING_TYPE_DMA_INDEX].ring_obj = NULL; in rv770_init()
1970 r600_ring_init(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX], 64 * 1024); in rv770_init()
1974 rdev->ih.ring_obj = NULL; in rv770_init()
1981 rdev->accel_working = true; in rv770_init()
1984 dev_err(rdev->dev, "disabling GPU acceleration\n"); in rv770_init()
1992 rdev->accel_working = false; in rv770_init()
1995 return 0; in rv770_init()
2016 kfree(rdev->bios); in rv770_fini()
2017 rdev->bios = NULL; in rv770_fini()
2025 if (radeon_pcie_gen2 == 0) in rv770_pcie_gen2_enable()
2028 if (rdev->flags & RADEON_IS_IGP) in rv770_pcie_gen2_enable()
2031 if (!(rdev->flags & RADEON_IS_PCIE)) in rv770_pcie_gen2_enable()
2038 if ((rdev->pdev->bus->max_bus_speed != PCIE_SPEED_5_0GT) && in rv770_pcie_gen2_enable()
2039 (rdev->pdev->bus->max_bus_speed != PCIE_SPEED_8_0GT)) in rv770_pcie_gen2_enable()
2042 DRM_INFO("enabling PCIE gen 2 link speeds, disable with radeon.pcie_gen2=0\n"); in rv770_pcie_gen2_enable()
2065 tmp = RREG32(0x541c); in rv770_pcie_gen2_enable()
2066 WREG32(0x541c, tmp | 0x8); in rv770_pcie_gen2_enable()
2068 link_cntl2 = RREG16(0x4088); in rv770_pcie_gen2_enable()
2070 link_cntl2 |= 0x2; in rv770_pcie_gen2_enable()
2071 WREG16(0x4088, link_cntl2); in rv770_pcie_gen2_enable()
2072 WREG32(MM_CFGREGS_CNTL, 0); in rv770_pcie_gen2_enable()
2092 /* XXX: only disable it if gen1 bridge vendor == 0x111d or 0x1106 */ in rv770_pcie_gen2_enable()