53 slice = ((w *
h) / 64) - 1;
83 if (size == 0xffffffff)
84 cp_coher_size = 0xffffffff;
86 cp_coher_size = ((size + 255) >> 8);
137 u32 sq_vtx_constant_word2, sq_vtx_constant_word3;
167 cp_set_surface_sync(rdev,
170 cp_set_surface_sync(rdev,
178 int format,
int w,
int h,
int pitch,
182 u32 sq_tex_resource_word0, sq_tex_resource_word1;
183 u32 sq_tex_resource_word4, sq_tex_resource_word7;
189 sq_tex_resource_word0 |= ((((pitch >> 3) - 1) << 6) |
191 sq_tex_resource_word1 = ((h - 1) << 0) |
199 sq_tex_resource_word7 = format |
202 cp_set_surface_sync(rdev,
229 if ((x2 == 1) && (y2 == 1))
279 u32 sq_config, sq_gpr_resource_mgmt_1, sq_gpr_resource_mgmt_2, sq_gpr_resource_mgmt_3;
280 u32 sq_thread_resource_mgmt, sq_thread_resource_mgmt_2;
281 u32 sq_stack_resource_mgmt_1, sq_stack_resource_mgmt_2, sq_stack_resource_mgmt_3;
282 int num_ps_gprs, num_vs_gprs, num_temp_gprs;
283 int num_gs_gprs, num_es_gprs, num_hs_gprs, num_ls_gprs;
284 int num_ps_threads, num_vs_threads, num_gs_threads, num_es_threads;
285 int num_hs_threads, num_ls_threads;
286 int num_ps_stack_entries, num_vs_stack_entries, num_gs_stack_entries, num_es_stack_entries;
287 int num_hs_stack_entries, num_ls_stack_entries;
312 num_ps_stack_entries = 42;
313 num_vs_stack_entries = 42;
314 num_gs_stack_entries = 42;
315 num_es_stack_entries = 42;
316 num_hs_stack_entries = 42;
317 num_ls_stack_entries = 42;
327 num_ps_threads = 128;
333 num_ps_stack_entries = 42;
334 num_vs_stack_entries = 42;
335 num_gs_stack_entries = 42;
336 num_es_stack_entries = 42;
337 num_hs_stack_entries = 42;
338 num_ls_stack_entries = 42;
348 num_ps_threads = 128;
354 num_ps_stack_entries = 85;
355 num_vs_stack_entries = 85;
356 num_gs_stack_entries = 85;
357 num_es_stack_entries = 85;
358 num_hs_stack_entries = 85;
359 num_ls_stack_entries = 85;
370 num_ps_threads = 128;
376 num_ps_stack_entries = 85;
377 num_vs_stack_entries = 85;
378 num_gs_stack_entries = 85;
379 num_es_stack_entries = 85;
380 num_hs_stack_entries = 85;
381 num_ls_stack_entries = 85;
397 num_ps_stack_entries = 42;
398 num_vs_stack_entries = 42;
399 num_gs_stack_entries = 42;
400 num_es_stack_entries = 42;
401 num_hs_stack_entries = 42;
402 num_ls_stack_entries = 42;
418 num_ps_stack_entries = 42;
419 num_vs_stack_entries = 42;
420 num_gs_stack_entries = 42;
421 num_es_stack_entries = 42;
422 num_hs_stack_entries = 42;
423 num_ls_stack_entries = 42;
439 num_ps_stack_entries = 85;
440 num_vs_stack_entries = 85;
441 num_gs_stack_entries = 85;
442 num_es_stack_entries = 85;
443 num_hs_stack_entries = 85;
444 num_ls_stack_entries = 85;
454 num_ps_threads = 128;
460 num_ps_stack_entries = 85;
461 num_vs_stack_entries = 85;
462 num_gs_stack_entries = 85;
463 num_es_stack_entries = 85;
464 num_hs_stack_entries = 85;
465 num_ls_stack_entries = 85;
475 num_ps_threads = 128;
481 num_ps_stack_entries = 42;
482 num_vs_stack_entries = 42;
483 num_gs_stack_entries = 42;
484 num_es_stack_entries = 42;
485 num_hs_stack_entries = 42;
486 num_ls_stack_entries = 42;
496 num_ps_threads = 128;
502 num_ps_stack_entries = 42;
503 num_vs_stack_entries = 42;
504 num_gs_stack_entries = 42;
505 num_es_stack_entries = 42;
506 num_hs_stack_entries = 42;
507 num_ls_stack_entries = 42;
529 sq_gpr_resource_mgmt_1 = (
NUM_PS_GPRS(num_ps_gprs) |
532 sq_gpr_resource_mgmt_2 = (
NUM_GS_GPRS(num_gs_gprs) |
534 sq_gpr_resource_mgmt_3 = (
NUM_HS_GPRS(num_hs_gprs) |
613 int num_packet2s = 0;
615 rdev->
r600_blit.primitives.set_render_target = set_render_target;
616 rdev->
r600_blit.primitives.cp_set_surface_sync = cp_set_surface_sync;
617 rdev->
r600_blit.primitives.set_shaders = set_shaders;
618 rdev->
r600_blit.primitives.set_vtx_resource = set_vtx_resource;
619 rdev->
r600_blit.primitives.set_tex_resource = set_tex_resource;
620 rdev->
r600_blit.primitives.set_scissors = set_scissors;
621 rdev->
r600_blit.primitives.draw_auto = draw_auto;
622 rdev->
r600_blit.primitives.set_default_state = set_default_state;
644 while (dwords & 0xf) {
649 obj_size = dwords * 4;
650 obj_size =
ALIGN(obj_size, 256);
657 obj_size =
ALIGN(obj_size, 256);
664 obj_size =
ALIGN(obj_size, 256);
672 DRM_ERROR(
"evergreen failed to allocate shader\n");
681 radeon_bo_unreserve(rdev->
r600_blit.shader_obj);
683 dev_err(rdev->
dev,
"(%d) pin blit object failed\n", r);
688 DRM_DEBUG(
"evergreen blit allocated bo %08x vs %08x ps %08x\n",
697 DRM_ERROR(
"failed to map blit object %d\n", r);
707 packet2s, num_packet2s * 4);
718 packet2s, num_packet2s * 4);
725 radeon_bo_unreserve(rdev->
r600_blit.shader_obj);