Commit 90bea0ab authored by Tom St Denis's avatar Tom St Denis Committed by Alex Deucher

amdgpu/gfxv8: Cleanup of gfx_v8_0_tiling_mode_table_init() (v2)

Simplification and LOC reduction of function gfx_v8_0_tiling_mode_table_init()

v2: remove spurious break
bug: https://bugs.freedesktop.org/show_bug.cgi?id=93236Signed-off-by: default avatarTom St Denis <tom.stdenis@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 8cdacf44
...@@ -1639,1407 +1639,917 @@ static int gfx_v8_0_sw_fini(void *handle) ...@@ -1639,1407 +1639,917 @@ static int gfx_v8_0_sw_fini(void *handle)
static void gfx_v8_0_tiling_mode_table_init(struct amdgpu_device *adev) static void gfx_v8_0_tiling_mode_table_init(struct amdgpu_device *adev)
{ {
uint32_t *modearray, *mod2array;
const u32 num_tile_mode_states = 32; const u32 num_tile_mode_states = 32;
const u32 num_secondary_tile_mode_states = 16; const u32 num_secondary_tile_mode_states = 16;
u32 reg_offset, gb_tile_moden, split_equal_to_row_size; u32 reg_offset;
switch (adev->gfx.config.mem_row_size_in_kb) { modearray = adev->gfx.config.tile_mode_array;
case 1: mod2array = adev->gfx.config.macrotile_mode_array;
split_equal_to_row_size = ADDR_SURF_TILE_SPLIT_1KB;
break; for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++)
case 2: modearray[reg_offset] = 0;
default:
split_equal_to_row_size = ADDR_SURF_TILE_SPLIT_2KB; for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++)
break; mod2array[reg_offset] = 0;
case 4:
split_equal_to_row_size = ADDR_SURF_TILE_SPLIT_4KB;
break;
}
switch (adev->asic_type) { switch (adev->asic_type) {
case CHIP_TOPAZ: case CHIP_TOPAZ:
for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++) { modearray[0] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
switch (reg_offset) { PIPE_CONFIG(ADDR_SURF_P2) |
case 0: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[1] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 1: modearray[2] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[3] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 2: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[4] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 3: modearray[5] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[6] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 4: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[8] = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P2));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[9] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 5: MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[10] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 6: modearray[11] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[13] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 8: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P2)); modearray[14] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 9: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[15] = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 10: modearray[16] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[18] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 11: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[19] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 13: modearray[20] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[21] = (ARRAY_MODE(ARRAY_3D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 14: MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[22] = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 15: modearray[24] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[25] = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 16: MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[26] = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 18: modearray[27] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); modearray[28] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 19: MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[29] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
case 20:
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | mod2array[0] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[1] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
case 21: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
PIPE_CONFIG(ADDR_SURF_P2) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[2] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 22: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) | mod2array[3] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[4] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 24: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
PIPE_CONFIG(ADDR_SURF_P2) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | mod2array[5] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 25: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) | mod2array[6] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[8] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
case 26: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
PIPE_CONFIG(ADDR_SURF_P2) | NUM_BANKS(ADDR_SURF_16_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[9] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
case 27: NUM_BANKS(ADDR_SURF_16_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | mod2array[10] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); NUM_BANKS(ADDR_SURF_16_BANK));
break; mod2array[11] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
case 28: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
PIPE_CONFIG(ADDR_SURF_P2) | NUM_BANKS(ADDR_SURF_16_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | mod2array[12] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
case 29: NUM_BANKS(ADDR_SURF_16_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | mod2array[13] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); NUM_BANKS(ADDR_SURF_16_BANK));
break; mod2array[14] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 7: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
case 12: MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 17: NUM_BANKS(ADDR_SURF_8_BANK));
case 23:
/* unused idx */ for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++)
continue; if (reg_offset != 7 && reg_offset != 12 && reg_offset != 17 &&
default: reg_offset != 23)
gb_tile_moden = 0; WREG32(mmGB_TILE_MODE0 + reg_offset, modearray[reg_offset]);
break;
}; for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++)
adev->gfx.config.tile_mode_array[reg_offset] = gb_tile_moden; if (reg_offset != 7)
WREG32(mmGB_TILE_MODE0 + reg_offset, gb_tile_moden); WREG32(mmGB_MACROTILE_MODE0 + reg_offset, mod2array[reg_offset]);
}
for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++) {
switch (reg_offset) {
case 0:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 1:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 2:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 3:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 4:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 5:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 6:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 8:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 9:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 10:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 11:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 12:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 13:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 14:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 7:
/* unused idx */
continue;
default:
gb_tile_moden = 0;
break;
};
adev->gfx.config.macrotile_mode_array[reg_offset] = gb_tile_moden;
WREG32(mmGB_MACROTILE_MODE0 + reg_offset, gb_tile_moden);
}
break; break;
case CHIP_FIJI: case CHIP_FIJI:
for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++) { modearray[0] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
switch (reg_offset) { PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 0: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | modearray[1] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 1: modearray[2] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[3] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 2: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | modearray[4] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 3: modearray[5] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[6] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 4: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | modearray[7] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P4_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 5: modearray[8] = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | modearray[9] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 6: modearray[10] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[11] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 7: MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
PIPE_CONFIG(ADDR_SURF_P4_16x16) | modearray[12] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P4_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
case 8: modearray[13] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16)); MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 9: modearray[14] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[15] = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 10: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | modearray[16] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
case 11: modearray[17] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P4_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); modearray[18] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 12: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P4_16x16) | modearray[19] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 13: modearray[20] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[21] = (ARRAY_MODE(ARRAY_3D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 14: MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | modearray[22] = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 15: modearray[23] = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P4_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[24] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 16: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | modearray[25] = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 17: modearray[26] = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P4_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); modearray[27] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
case 18: MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | modearray[28] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 19: modearray[29] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); modearray[30] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P4_16x16) |
case 20: MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[0] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 21: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THICK) | mod2array[1] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[2] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 22: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[3] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 23: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) | mod2array[4] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P4_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[5] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 24: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | mod2array[6] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
case 25: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) | mod2array[8] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[9] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 26: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[10] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
case 27: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | mod2array[11] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[12] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 28: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | mod2array[13] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 29: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | mod2array[14] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P16_32x32_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); NUM_BANKS(ADDR_SURF_4_BANK));
break;
case 30: for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++)
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | WREG32(mmGB_TILE_MODE0 + reg_offset, modearray[reg_offset]);
PIPE_CONFIG(ADDR_SURF_P4_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++)
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); if (reg_offset != 7)
break; WREG32(mmGB_MACROTILE_MODE0 + reg_offset, mod2array[reg_offset]);
default:
gb_tile_moden = 0;
break;
}
adev->gfx.config.tile_mode_array[reg_offset] = gb_tile_moden;
WREG32(mmGB_TILE_MODE0 + reg_offset, gb_tile_moden);
}
for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++) {
switch (reg_offset) {
case 0:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 1:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 2:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 3:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 4:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 5:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 6:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 8:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 9:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 10:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 11:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 12:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 13:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 14:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_4_BANK));
break;
case 7:
/* unused idx */
continue;
default:
gb_tile_moden = 0;
break;
}
adev->gfx.config.macrotile_mode_array[reg_offset] = gb_tile_moden;
WREG32(mmGB_MACROTILE_MODE0 + reg_offset, gb_tile_moden);
}
break; break;
case CHIP_TONGA: case CHIP_TONGA:
for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++) { modearray[0] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
switch (reg_offset) { PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 0: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | modearray[1] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 1: modearray[2] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[3] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 2: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | modearray[4] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 3: modearray[5] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[6] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 4: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | modearray[7] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P4_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 5: modearray[8] = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | modearray[9] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 6: modearray[10] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[11] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 7: MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
PIPE_CONFIG(ADDR_SURF_P4_16x16) | modearray[12] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P4_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
case 8: modearray[13] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16)); MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 9: modearray[14] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[15] = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 10: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | modearray[16] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
case 11: modearray[17] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P4_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); modearray[18] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 12: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P4_16x16) | modearray[19] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 13: modearray[20] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[21] = (ARRAY_MODE(ARRAY_3D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 14: MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | modearray[22] = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 15: modearray[23] = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P4_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[24] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 16: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | modearray[25] = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 17: modearray[26] = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P4_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); modearray[27] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
case 18: MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | modearray[28] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 19: modearray[29] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); modearray[30] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P4_16x16) |
case 20: MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[0] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
case 21: NUM_BANKS(ADDR_SURF_16_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THICK) | mod2array[1] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_16_BANK));
break; mod2array[2] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 22: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | NUM_BANKS(ADDR_SURF_16_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[3] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
case 23: NUM_BANKS(ADDR_SURF_16_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) | mod2array[4] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P4_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_16_BANK));
break; mod2array[5] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 24: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | NUM_BANKS(ADDR_SURF_16_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | mod2array[6] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
case 25: NUM_BANKS(ADDR_SURF_16_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) | mod2array[8] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_16_BANK));
break; mod2array[9] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 26: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | NUM_BANKS(ADDR_SURF_16_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[10] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 27: NUM_BANKS(ADDR_SURF_16_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | mod2array[11] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); NUM_BANKS(ADDR_SURF_16_BANK));
break; mod2array[12] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 28: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | mod2array[13] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
case 29: NUM_BANKS(ADDR_SURF_4_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | mod2array[14] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P8_32x32_16x16) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); NUM_BANKS(ADDR_SURF_4_BANK));
break;
case 30: for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++)
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | WREG32(mmGB_TILE_MODE0 + reg_offset, modearray[reg_offset]);
PIPE_CONFIG(ADDR_SURF_P4_16x16) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++)
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); if (reg_offset != 7)
break; WREG32(mmGB_MACROTILE_MODE0 + reg_offset, mod2array[reg_offset]);
default:
gb_tile_moden = 0;
break;
};
adev->gfx.config.tile_mode_array[reg_offset] = gb_tile_moden;
WREG32(mmGB_TILE_MODE0 + reg_offset, gb_tile_moden);
}
for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++) {
switch (reg_offset) {
case 0:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 1:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 2:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 3:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 4:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 5:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 6:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 8:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 9:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 10:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 11:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 12:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 13:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_4_BANK));
break;
case 14:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_1) |
NUM_BANKS(ADDR_SURF_4_BANK));
break;
case 7:
/* unused idx */
continue;
default:
gb_tile_moden = 0;
break;
};
adev->gfx.config.macrotile_mode_array[reg_offset] = gb_tile_moden;
WREG32(mmGB_MACROTILE_MODE0 + reg_offset, gb_tile_moden);
}
break; break;
case CHIP_STONEY: case CHIP_STONEY:
for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++) { modearray[0] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
switch (reg_offset) { PIPE_CONFIG(ADDR_SURF_P2) |
case 0: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[1] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 1: modearray[2] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[3] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 2: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[4] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
case 3: modearray[5] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[6] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 4: TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[8] = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P2));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[9] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 5: MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[10] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 6: modearray[11] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); modearray[13] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 8: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P2)); modearray[14] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 9: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[15] = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
case 10: modearray[16] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[18] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 11: MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[19] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 13: modearray[20] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[21] = (ARRAY_MODE(ARRAY_3D_TILED_THICK) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 14: MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[22] = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 15: modearray[24] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); modearray[25] = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 16: MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[26] = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
case 18: modearray[27] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | PIPE_CONFIG(ADDR_SURF_P2) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); modearray[28] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
break; PIPE_CONFIG(ADDR_SURF_P2) |
case 19: MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
PIPE_CONFIG(ADDR_SURF_P2) | modearray[29] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | PIPE_CONFIG(ADDR_SURF_P2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
break; SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
case 20:
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | mod2array[0] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[1] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 21: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
PIPE_CONFIG(ADDR_SURF_P2) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[2] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 22: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) | mod2array[3] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[4] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 24: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
PIPE_CONFIG(ADDR_SURF_P2) | NUM_BANKS(ADDR_SURF_8_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | mod2array[5] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 25: NUM_BANKS(ADDR_SURF_8_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) | mod2array[6] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); NUM_BANKS(ADDR_SURF_8_BANK));
break; mod2array[8] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
case 26: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
PIPE_CONFIG(ADDR_SURF_P2) | NUM_BANKS(ADDR_SURF_16_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | mod2array[9] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
case 27: NUM_BANKS(ADDR_SURF_16_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | mod2array[10] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); NUM_BANKS(ADDR_SURF_16_BANK));
break; mod2array[11] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
case 28: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
PIPE_CONFIG(ADDR_SURF_P2) | NUM_BANKS(ADDR_SURF_16_BANK));
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | mod2array[12] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
break; MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
case 29: NUM_BANKS(ADDR_SURF_16_BANK));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | mod2array[13] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
PIPE_CONFIG(ADDR_SURF_P2) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); NUM_BANKS(ADDR_SURF_16_BANK));
break; mod2array[14] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 7: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
case 12: MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
case 17: NUM_BANKS(ADDR_SURF_8_BANK));
case 23:
/* unused idx */ for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++)
continue; if (reg_offset != 7 && reg_offset != 12 && reg_offset != 17 &&
default: reg_offset != 23)
gb_tile_moden = 0; WREG32(mmGB_TILE_MODE0 + reg_offset, modearray[reg_offset]);
break;
}; for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++)
adev->gfx.config.tile_mode_array[reg_offset] = gb_tile_moden; if (reg_offset != 7)
WREG32(mmGB_TILE_MODE0 + reg_offset, gb_tile_moden); WREG32(mmGB_MACROTILE_MODE0 + reg_offset, mod2array[reg_offset]);
}
for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++) {
switch (reg_offset) {
case 0:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 1:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 2:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 3:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 4:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 5:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 6:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 8:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 9:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 10:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 11:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 12:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 13:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 14:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 7:
/* unused idx */
continue;
default:
gb_tile_moden = 0;
break;
};
adev->gfx.config.macrotile_mode_array[reg_offset] = gb_tile_moden;
WREG32(mmGB_MACROTILE_MODE0 + reg_offset, gb_tile_moden);
}
break; break;
case CHIP_CARRIZO:
default: default:
for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++) { dev_warn(adev->dev,
switch (reg_offset) { "Unknown chip type (%d) in function gfx_v8_0_tiling_mode_table_init() falling through to CHIP_CARRIZO\n",
case 0: adev->asic_type);
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
PIPE_CONFIG(ADDR_SURF_P2) | case CHIP_CARRIZO:
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) | modearray[0] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); PIPE_CONFIG(ADDR_SURF_P2) |
break; TILE_SPLIT(ADDR_SURF_TILE_SPLIT_64B) |
case 1: MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | modearray[1] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_128B) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
break; modearray[2] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
case 2: PIPE_CONFIG(ADDR_SURF_P2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_256B) | modearray[3] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); PIPE_CONFIG(ADDR_SURF_P2) |
break; TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) |
case 3: MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | modearray[4] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_512B) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
break; modearray[5] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
case 4: PIPE_CONFIG(ADDR_SURF_P2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
PIPE_CONFIG(ADDR_SURF_P2) | MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | modearray[6] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); PIPE_CONFIG(ADDR_SURF_P2) |
break; TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) |
case 5: MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING));
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | modearray[8] = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2));
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | modearray[9] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); PIPE_CONFIG(ADDR_SURF_P2) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
case 6: SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | modearray[10] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2) |
TILE_SPLIT(ADDR_SURF_TILE_SPLIT_2KB) | MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DEPTH_MICRO_TILING)); SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
break; modearray[11] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
case 8: PIPE_CONFIG(ADDR_SURF_P2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_LINEAR_ALIGNED) | MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) |
PIPE_CONFIG(ADDR_SURF_P2)); SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
break; modearray[13] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
case 9: PIPE_CONFIG(ADDR_SURF_P2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
PIPE_CONFIG(ADDR_SURF_P2) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | modearray[14] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); PIPE_CONFIG(ADDR_SURF_P2) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
case 10: SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | modearray[15] = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
break; modearray[16] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
case 11: PIPE_CONFIG(ADDR_SURF_P2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
PIPE_CONFIG(ADDR_SURF_P2) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
MICRO_TILE_MODE_NEW(ADDR_SURF_DISPLAY_MICRO_TILING) | modearray[18] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); PIPE_CONFIG(ADDR_SURF_P2) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
case 13: SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | modearray[19] = (ARRAY_MODE(ARRAY_1D_TILED_THICK) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
break; modearray[20] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
case 14: PIPE_CONFIG(ADDR_SURF_P2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
PIPE_CONFIG(ADDR_SURF_P2) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | modearray[21] = (ARRAY_MODE(ARRAY_3D_TILED_THICK) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); PIPE_CONFIG(ADDR_SURF_P2) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
case 15: SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THIN1) | modearray[22] = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
break; modearray[24] = (ARRAY_MODE(ARRAY_2D_TILED_THICK) |
case 16: PIPE_CONFIG(ADDR_SURF_P2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) |
PIPE_CONFIG(ADDR_SURF_P2) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | modearray[25] = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); PIPE_CONFIG(ADDR_SURF_P2) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
case 18: SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | modearray[26] = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1));
break; modearray[27] = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) |
case 19: PIPE_CONFIG(ADDR_SURF_P2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THICK) | MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
PIPE_CONFIG(ADDR_SURF_P2) | SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | modearray[28] = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); PIPE_CONFIG(ADDR_SURF_P2) |
break; MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
case 20: SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2));
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | modearray[29] = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) |
PIPE_CONFIG(ADDR_SURF_P2) | PIPE_CONFIG(ADDR_SURF_P2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8));
break;
case 21: mod2array[0] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_THICK) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
PIPE_CONFIG(ADDR_SURF_P2) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | NUM_BANKS(ADDR_SURF_8_BANK));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); mod2array[1] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
break; BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
case 22: MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THICK) | NUM_BANKS(ADDR_SURF_8_BANK));
PIPE_CONFIG(ADDR_SURF_P2) | mod2array[2] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
break; NUM_BANKS(ADDR_SURF_8_BANK));
case 24: mod2array[3] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THICK) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
PIPE_CONFIG(ADDR_SURF_P2) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THIN_MICRO_TILING) | NUM_BANKS(ADDR_SURF_8_BANK));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); mod2array[4] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
break; BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
case 25: MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_XTHICK) | NUM_BANKS(ADDR_SURF_8_BANK));
PIPE_CONFIG(ADDR_SURF_P2) | mod2array[5] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
break; NUM_BANKS(ADDR_SURF_8_BANK));
case 26: mod2array[6] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
gb_tile_moden = (ARRAY_MODE(ARRAY_3D_TILED_XTHICK) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
PIPE_CONFIG(ADDR_SURF_P2) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
MICRO_TILE_MODE_NEW(ADDR_SURF_THICK_MICRO_TILING) | NUM_BANKS(ADDR_SURF_8_BANK));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_1)); mod2array[8] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
break; BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
case 27: MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
gb_tile_moden = (ARRAY_MODE(ARRAY_1D_TILED_THIN1) | NUM_BANKS(ADDR_SURF_16_BANK));
PIPE_CONFIG(ADDR_SURF_P2) | mod2array[9] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
break; NUM_BANKS(ADDR_SURF_16_BANK));
case 28: mod2array[10] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
gb_tile_moden = (ARRAY_MODE(ARRAY_2D_TILED_THIN1) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
PIPE_CONFIG(ADDR_SURF_P2) | MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | NUM_BANKS(ADDR_SURF_16_BANK));
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_2)); mod2array[11] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
break; BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
case 29: MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
gb_tile_moden = (ARRAY_MODE(ARRAY_PRT_TILED_THIN1) | NUM_BANKS(ADDR_SURF_16_BANK));
PIPE_CONFIG(ADDR_SURF_P2) | mod2array[12] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
MICRO_TILE_MODE_NEW(ADDR_SURF_ROTATED_MICRO_TILING) | BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
SAMPLE_SPLIT(ADDR_SURF_SAMPLE_SPLIT_8)); MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
break; NUM_BANKS(ADDR_SURF_16_BANK));
case 7: mod2array[13] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
case 12: BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
case 17: MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
case 23: NUM_BANKS(ADDR_SURF_16_BANK));
/* unused idx */ mod2array[14] = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
continue; BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
default: MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
gb_tile_moden = 0; NUM_BANKS(ADDR_SURF_8_BANK));
break;
}; for (reg_offset = 0; reg_offset < num_tile_mode_states; reg_offset++)
adev->gfx.config.tile_mode_array[reg_offset] = gb_tile_moden; if (reg_offset != 7 && reg_offset != 12 && reg_offset != 17 &&
WREG32(mmGB_TILE_MODE0 + reg_offset, gb_tile_moden); reg_offset != 23)
} WREG32(mmGB_TILE_MODE0 + reg_offset, modearray[reg_offset]);
for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++) {
switch (reg_offset) { for (reg_offset = 0; reg_offset < num_secondary_tile_mode_states; reg_offset++)
case 0: if (reg_offset != 7)
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) | WREG32(mmGB_MACROTILE_MODE0 + reg_offset, mod2array[reg_offset]);
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) | break;
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 1:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 2:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 3:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 4:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 5:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 6:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 8:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_8) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 9:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_4) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 10:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_4) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 11:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_2) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 12:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_2) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 13:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_4) |
NUM_BANKS(ADDR_SURF_16_BANK));
break;
case 14:
gb_tile_moden = (BANK_WIDTH(ADDR_SURF_BANK_WIDTH_1) |
BANK_HEIGHT(ADDR_SURF_BANK_HEIGHT_1) |
MACRO_TILE_ASPECT(ADDR_SURF_MACRO_ASPECT_2) |
NUM_BANKS(ADDR_SURF_8_BANK));
break;
case 7:
/* unused idx */
continue;
default:
gb_tile_moden = 0;
break;
};
adev->gfx.config.macrotile_mode_array[reg_offset] = gb_tile_moden;
WREG32(mmGB_MACROTILE_MODE0 + reg_offset, gb_tile_moden);
}
} }
} }
...@@ -4957,7 +4467,7 @@ static void gfx_v8_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr, ...@@ -4957,7 +4467,7 @@ static void gfx_v8_0_ring_emit_fence_gfx(struct amdgpu_ring *ring, u64 addr,
EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) | EVENT_TYPE(CACHE_FLUSH_AND_INV_TS_EVENT) |
EVENT_INDEX(5))); EVENT_INDEX(5)));
amdgpu_ring_write(ring, addr & 0xfffffffc); amdgpu_ring_write(ring, addr & 0xfffffffc);
amdgpu_ring_write(ring, (upper_32_bits(addr) & 0xffff) | amdgpu_ring_write(ring, (upper_32_bits(addr) & 0xffff) |
DATA_SEL(write64bit ? 2 : 1) | INT_SEL(int_sel ? 2 : 0)); DATA_SEL(write64bit ? 2 : 1) | INT_SEL(int_sel ? 2 : 0));
amdgpu_ring_write(ring, lower_32_bits(seq)); amdgpu_ring_write(ring, lower_32_bits(seq));
amdgpu_ring_write(ring, upper_32_bits(seq)); amdgpu_ring_write(ring, upper_32_bits(seq));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment