Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu: split gfx8 gpu init into sw and hw parts

Calculate the driver state in sw_init and program the
registers in hw init.

Acked-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

+197 -190
+197 -190
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
··· 903 903 return 0; 904 904 } 905 905 906 + static void gfx_v8_0_gpu_early_init(struct amdgpu_device *adev) 907 + { 908 + u32 gb_addr_config; 909 + u32 mc_shared_chmap, mc_arb_ramcfg; 910 + u32 dimm00_addr_map, dimm01_addr_map, dimm10_addr_map, dimm11_addr_map; 911 + u32 tmp; 912 + 913 + switch (adev->asic_type) { 914 + case CHIP_TOPAZ: 915 + adev->gfx.config.max_shader_engines = 1; 916 + adev->gfx.config.max_tile_pipes = 2; 917 + adev->gfx.config.max_cu_per_sh = 6; 918 + adev->gfx.config.max_sh_per_se = 1; 919 + adev->gfx.config.max_backends_per_se = 2; 920 + adev->gfx.config.max_texture_channel_caches = 2; 921 + adev->gfx.config.max_gprs = 256; 922 + adev->gfx.config.max_gs_threads = 32; 923 + adev->gfx.config.max_hw_contexts = 8; 924 + 925 + adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 926 + adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 927 + adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 928 + adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 929 + gb_addr_config = TOPAZ_GB_ADDR_CONFIG_GOLDEN; 930 + break; 931 + case CHIP_FIJI: 932 + adev->gfx.config.max_shader_engines = 4; 933 + adev->gfx.config.max_tile_pipes = 16; 934 + adev->gfx.config.max_cu_per_sh = 16; 935 + adev->gfx.config.max_sh_per_se = 1; 936 + adev->gfx.config.max_backends_per_se = 4; 937 + adev->gfx.config.max_texture_channel_caches = 8; 938 + adev->gfx.config.max_gprs = 256; 939 + adev->gfx.config.max_gs_threads = 32; 940 + adev->gfx.config.max_hw_contexts = 8; 941 + 942 + adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 943 + adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 944 + adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 945 + adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 946 + gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN; 947 + break; 948 + case CHIP_TONGA: 949 + adev->gfx.config.max_shader_engines = 4; 950 + adev->gfx.config.max_tile_pipes = 8; 951 + adev->gfx.config.max_cu_per_sh = 8; 952 + adev->gfx.config.max_sh_per_se = 1; 953 + adev->gfx.config.max_backends_per_se = 2; 954 + adev->gfx.config.max_texture_channel_caches = 8; 955 + adev->gfx.config.max_gprs = 256; 956 + adev->gfx.config.max_gs_threads = 32; 957 + adev->gfx.config.max_hw_contexts = 8; 958 + 959 + adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 960 + adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 961 + adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 962 + adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 963 + gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN; 964 + break; 965 + case CHIP_CARRIZO: 966 + adev->gfx.config.max_shader_engines = 1; 967 + adev->gfx.config.max_tile_pipes = 2; 968 + adev->gfx.config.max_sh_per_se = 1; 969 + adev->gfx.config.max_backends_per_se = 2; 970 + 971 + switch (adev->pdev->revision) { 972 + case 0xc4: 973 + case 0x84: 974 + case 0xc8: 975 + case 0xcc: 976 + /* B10 */ 977 + adev->gfx.config.max_cu_per_sh = 8; 978 + break; 979 + case 0xc5: 980 + case 0x81: 981 + case 0x85: 982 + case 0xc9: 983 + case 0xcd: 984 + /* B8 */ 985 + adev->gfx.config.max_cu_per_sh = 6; 986 + break; 987 + case 0xc6: 988 + case 0xca: 989 + case 0xce: 990 + /* B6 */ 991 + adev->gfx.config.max_cu_per_sh = 6; 992 + break; 993 + case 0xc7: 994 + case 0x87: 995 + case 0xcb: 996 + default: 997 + /* B4 */ 998 + adev->gfx.config.max_cu_per_sh = 4; 999 + break; 1000 + } 1001 + 1002 + adev->gfx.config.max_texture_channel_caches = 2; 1003 + adev->gfx.config.max_gprs = 256; 1004 + adev->gfx.config.max_gs_threads = 32; 1005 + adev->gfx.config.max_hw_contexts = 8; 1006 + 1007 + adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 1008 + adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 1009 + adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 1010 + adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 1011 + gb_addr_config = CARRIZO_GB_ADDR_CONFIG_GOLDEN; 1012 + break; 1013 + default: 1014 + adev->gfx.config.max_shader_engines = 2; 1015 + adev->gfx.config.max_tile_pipes = 4; 1016 + adev->gfx.config.max_cu_per_sh = 2; 1017 + adev->gfx.config.max_sh_per_se = 1; 1018 + adev->gfx.config.max_backends_per_se = 2; 1019 + adev->gfx.config.max_texture_channel_caches = 4; 1020 + adev->gfx.config.max_gprs = 256; 1021 + adev->gfx.config.max_gs_threads = 32; 1022 + adev->gfx.config.max_hw_contexts = 8; 1023 + 1024 + adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 1025 + adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 1026 + adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 1027 + adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 1028 + gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN; 1029 + break; 1030 + } 1031 + 1032 + mc_shared_chmap = RREG32(mmMC_SHARED_CHMAP); 1033 + adev->gfx.config.mc_arb_ramcfg = RREG32(mmMC_ARB_RAMCFG); 1034 + mc_arb_ramcfg = adev->gfx.config.mc_arb_ramcfg; 1035 + 1036 + adev->gfx.config.num_tile_pipes = adev->gfx.config.max_tile_pipes; 1037 + adev->gfx.config.mem_max_burst_length_bytes = 256; 1038 + if (adev->flags & AMD_IS_APU) { 1039 + /* Get memory bank mapping mode. */ 1040 + tmp = RREG32(mmMC_FUS_DRAM0_BANK_ADDR_MAPPING); 1041 + dimm00_addr_map = REG_GET_FIELD(tmp, MC_FUS_DRAM0_BANK_ADDR_MAPPING, DIMM0ADDRMAP); 1042 + dimm01_addr_map = REG_GET_FIELD(tmp, MC_FUS_DRAM0_BANK_ADDR_MAPPING, DIMM1ADDRMAP); 1043 + 1044 + tmp = RREG32(mmMC_FUS_DRAM1_BANK_ADDR_MAPPING); 1045 + dimm10_addr_map = REG_GET_FIELD(tmp, MC_FUS_DRAM1_BANK_ADDR_MAPPING, DIMM0ADDRMAP); 1046 + dimm11_addr_map = REG_GET_FIELD(tmp, MC_FUS_DRAM1_BANK_ADDR_MAPPING, DIMM1ADDRMAP); 1047 + 1048 + /* Validate settings in case only one DIMM installed. */ 1049 + if ((dimm00_addr_map == 0) || (dimm00_addr_map == 3) || (dimm00_addr_map == 4) || (dimm00_addr_map > 12)) 1050 + dimm00_addr_map = 0; 1051 + if ((dimm01_addr_map == 0) || (dimm01_addr_map == 3) || (dimm01_addr_map == 4) || (dimm01_addr_map > 12)) 1052 + dimm01_addr_map = 0; 1053 + if ((dimm10_addr_map == 0) || (dimm10_addr_map == 3) || (dimm10_addr_map == 4) || (dimm10_addr_map > 12)) 1054 + dimm10_addr_map = 0; 1055 + if ((dimm11_addr_map == 0) || (dimm11_addr_map == 3) || (dimm11_addr_map == 4) || (dimm11_addr_map > 12)) 1056 + dimm11_addr_map = 0; 1057 + 1058 + /* If DIMM Addr map is 8GB, ROW size should be 2KB. Otherwise 1KB. */ 1059 + /* If ROW size(DIMM1) != ROW size(DMIMM0), ROW size should be larger one. */ 1060 + if ((dimm00_addr_map == 11) || (dimm01_addr_map == 11) || (dimm10_addr_map == 11) || (dimm11_addr_map == 11)) 1061 + adev->gfx.config.mem_row_size_in_kb = 2; 1062 + else 1063 + adev->gfx.config.mem_row_size_in_kb = 1; 1064 + } else { 1065 + tmp = REG_GET_FIELD(mc_arb_ramcfg, MC_ARB_RAMCFG, NOOFCOLS); 1066 + adev->gfx.config.mem_row_size_in_kb = (4 * (1 << (8 + tmp))) / 1024; 1067 + if (adev->gfx.config.mem_row_size_in_kb > 4) 1068 + adev->gfx.config.mem_row_size_in_kb = 4; 1069 + } 1070 + 1071 + adev->gfx.config.shader_engine_tile_size = 32; 1072 + adev->gfx.config.num_gpus = 1; 1073 + adev->gfx.config.multi_gpu_tile_size = 64; 1074 + 1075 + /* fix up row size */ 1076 + switch (adev->gfx.config.mem_row_size_in_kb) { 1077 + case 1: 1078 + default: 1079 + gb_addr_config = REG_SET_FIELD(gb_addr_config, GB_ADDR_CONFIG, ROW_SIZE, 0); 1080 + break; 1081 + case 2: 1082 + gb_addr_config = REG_SET_FIELD(gb_addr_config, GB_ADDR_CONFIG, ROW_SIZE, 1); 1083 + break; 1084 + case 4: 1085 + gb_addr_config = REG_SET_FIELD(gb_addr_config, GB_ADDR_CONFIG, ROW_SIZE, 2); 1086 + break; 1087 + } 1088 + adev->gfx.config.gb_addr_config = gb_addr_config; 1089 + } 1090 + 906 1091 static int gfx_v8_0_sw_init(void *handle) 907 1092 { 908 1093 int i, r; ··· 1194 1009 return r; 1195 1010 1196 1011 adev->gfx.ce_ram_size = 0x8000; 1012 + 1013 + gfx_v8_0_gpu_early_init(adev); 1197 1014 1198 1015 return 0; 1199 1016 } ··· 2230 2043 2231 2044 static void gfx_v8_0_gpu_init(struct amdgpu_device *adev) 2232 2045 { 2233 - u32 gb_addr_config; 2234 - u32 mc_shared_chmap, mc_arb_ramcfg; 2235 - u32 dimm00_addr_map, dimm01_addr_map, dimm10_addr_map, dimm11_addr_map; 2236 2046 u32 tmp; 2237 2047 int i; 2238 - 2239 - switch (adev->asic_type) { 2240 - case CHIP_TOPAZ: 2241 - adev->gfx.config.max_shader_engines = 1; 2242 - adev->gfx.config.max_tile_pipes = 2; 2243 - adev->gfx.config.max_cu_per_sh = 6; 2244 - adev->gfx.config.max_sh_per_se = 1; 2245 - adev->gfx.config.max_backends_per_se = 2; 2246 - adev->gfx.config.max_texture_channel_caches = 2; 2247 - adev->gfx.config.max_gprs = 256; 2248 - adev->gfx.config.max_gs_threads = 32; 2249 - adev->gfx.config.max_hw_contexts = 8; 2250 - 2251 - adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 2252 - adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 2253 - adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 2254 - adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 2255 - gb_addr_config = TOPAZ_GB_ADDR_CONFIG_GOLDEN; 2256 - break; 2257 - case CHIP_FIJI: 2258 - adev->gfx.config.max_shader_engines = 4; 2259 - adev->gfx.config.max_tile_pipes = 16; 2260 - adev->gfx.config.max_cu_per_sh = 16; 2261 - adev->gfx.config.max_sh_per_se = 1; 2262 - adev->gfx.config.max_backends_per_se = 4; 2263 - adev->gfx.config.max_texture_channel_caches = 8; 2264 - adev->gfx.config.max_gprs = 256; 2265 - adev->gfx.config.max_gs_threads = 32; 2266 - adev->gfx.config.max_hw_contexts = 8; 2267 - 2268 - adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 2269 - adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 2270 - adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 2271 - adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 2272 - gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN; 2273 - break; 2274 - case CHIP_TONGA: 2275 - adev->gfx.config.max_shader_engines = 4; 2276 - adev->gfx.config.max_tile_pipes = 8; 2277 - adev->gfx.config.max_cu_per_sh = 8; 2278 - adev->gfx.config.max_sh_per_se = 1; 2279 - adev->gfx.config.max_backends_per_se = 2; 2280 - adev->gfx.config.max_texture_channel_caches = 8; 2281 - adev->gfx.config.max_gprs = 256; 2282 - adev->gfx.config.max_gs_threads = 32; 2283 - adev->gfx.config.max_hw_contexts = 8; 2284 - 2285 - adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 2286 - adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 2287 - adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 2288 - adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 2289 - gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN; 2290 - break; 2291 - case CHIP_CARRIZO: 2292 - adev->gfx.config.max_shader_engines = 1; 2293 - adev->gfx.config.max_tile_pipes = 2; 2294 - adev->gfx.config.max_sh_per_se = 1; 2295 - adev->gfx.config.max_backends_per_se = 2; 2296 - 2297 - switch (adev->pdev->revision) { 2298 - case 0xc4: 2299 - case 0x84: 2300 - case 0xc8: 2301 - case 0xcc: 2302 - /* B10 */ 2303 - adev->gfx.config.max_cu_per_sh = 8; 2304 - break; 2305 - case 0xc5: 2306 - case 0x81: 2307 - case 0x85: 2308 - case 0xc9: 2309 - case 0xcd: 2310 - /* B8 */ 2311 - adev->gfx.config.max_cu_per_sh = 6; 2312 - break; 2313 - case 0xc6: 2314 - case 0xca: 2315 - case 0xce: 2316 - /* B6 */ 2317 - adev->gfx.config.max_cu_per_sh = 6; 2318 - break; 2319 - case 0xc7: 2320 - case 0x87: 2321 - case 0xcb: 2322 - default: 2323 - /* B4 */ 2324 - adev->gfx.config.max_cu_per_sh = 4; 2325 - break; 2326 - } 2327 - 2328 - adev->gfx.config.max_texture_channel_caches = 2; 2329 - adev->gfx.config.max_gprs = 256; 2330 - adev->gfx.config.max_gs_threads = 32; 2331 - adev->gfx.config.max_hw_contexts = 8; 2332 - 2333 - adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 2334 - adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 2335 - adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 2336 - adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 2337 - gb_addr_config = CARRIZO_GB_ADDR_CONFIG_GOLDEN; 2338 - break; 2339 - default: 2340 - adev->gfx.config.max_shader_engines = 2; 2341 - adev->gfx.config.max_tile_pipes = 4; 2342 - adev->gfx.config.max_cu_per_sh = 2; 2343 - adev->gfx.config.max_sh_per_se = 1; 2344 - adev->gfx.config.max_backends_per_se = 2; 2345 - adev->gfx.config.max_texture_channel_caches = 4; 2346 - adev->gfx.config.max_gprs = 256; 2347 - adev->gfx.config.max_gs_threads = 32; 2348 - adev->gfx.config.max_hw_contexts = 8; 2349 - 2350 - adev->gfx.config.sc_prim_fifo_size_frontend = 0x20; 2351 - adev->gfx.config.sc_prim_fifo_size_backend = 0x100; 2352 - adev->gfx.config.sc_hiz_tile_fifo_size = 0x30; 2353 - adev->gfx.config.sc_earlyz_tile_fifo_size = 0x130; 2354 - gb_addr_config = TONGA_GB_ADDR_CONFIG_GOLDEN; 2355 - break; 2356 - } 2357 2048 2358 2049 tmp = RREG32(mmGRBM_CNTL); 2359 2050 tmp = REG_SET_FIELD(tmp, GRBM_CNTL, READ_TIMEOUT, 0xff); 2360 2051 WREG32(mmGRBM_CNTL, tmp); 2361 2052 2362 - mc_shared_chmap = RREG32(mmMC_SHARED_CHMAP); 2363 - adev->gfx.config.mc_arb_ramcfg = RREG32(mmMC_ARB_RAMCFG); 2364 - mc_arb_ramcfg = adev->gfx.config.mc_arb_ramcfg; 2365 - 2366 - adev->gfx.config.num_tile_pipes = adev->gfx.config.max_tile_pipes; 2367 - adev->gfx.config.mem_max_burst_length_bytes = 256; 2368 - if (adev->flags & AMD_IS_APU) { 2369 - /* Get memory bank mapping mode. */ 2370 - tmp = RREG32(mmMC_FUS_DRAM0_BANK_ADDR_MAPPING); 2371 - dimm00_addr_map = REG_GET_FIELD(tmp, MC_FUS_DRAM0_BANK_ADDR_MAPPING, DIMM0ADDRMAP); 2372 - dimm01_addr_map = REG_GET_FIELD(tmp, MC_FUS_DRAM0_BANK_ADDR_MAPPING, DIMM1ADDRMAP); 2373 - 2374 - tmp = RREG32(mmMC_FUS_DRAM1_BANK_ADDR_MAPPING); 2375 - dimm10_addr_map = REG_GET_FIELD(tmp, MC_FUS_DRAM1_BANK_ADDR_MAPPING, DIMM0ADDRMAP); 2376 - dimm11_addr_map = REG_GET_FIELD(tmp, MC_FUS_DRAM1_BANK_ADDR_MAPPING, DIMM1ADDRMAP); 2377 - 2378 - /* Validate settings in case only one DIMM installed. */ 2379 - if ((dimm00_addr_map == 0) || (dimm00_addr_map == 3) || (dimm00_addr_map == 4) || (dimm00_addr_map > 12)) 2380 - dimm00_addr_map = 0; 2381 - if ((dimm01_addr_map == 0) || (dimm01_addr_map == 3) || (dimm01_addr_map == 4) || (dimm01_addr_map > 12)) 2382 - dimm01_addr_map = 0; 2383 - if ((dimm10_addr_map == 0) || (dimm10_addr_map == 3) || (dimm10_addr_map == 4) || (dimm10_addr_map > 12)) 2384 - dimm10_addr_map = 0; 2385 - if ((dimm11_addr_map == 0) || (dimm11_addr_map == 3) || (dimm11_addr_map == 4) || (dimm11_addr_map > 12)) 2386 - dimm11_addr_map = 0; 2387 - 2388 - /* If DIMM Addr map is 8GB, ROW size should be 2KB. Otherwise 1KB. */ 2389 - /* If ROW size(DIMM1) != ROW size(DMIMM0), ROW size should be larger one. */ 2390 - if ((dimm00_addr_map == 11) || (dimm01_addr_map == 11) || (dimm10_addr_map == 11) || (dimm11_addr_map == 11)) 2391 - adev->gfx.config.mem_row_size_in_kb = 2; 2392 - else 2393 - adev->gfx.config.mem_row_size_in_kb = 1; 2394 - } else { 2395 - tmp = REG_GET_FIELD(mc_arb_ramcfg, MC_ARB_RAMCFG, NOOFCOLS); 2396 - adev->gfx.config.mem_row_size_in_kb = (4 * (1 << (8 + tmp))) / 1024; 2397 - if (adev->gfx.config.mem_row_size_in_kb > 4) 2398 - adev->gfx.config.mem_row_size_in_kb = 4; 2399 - } 2400 - 2401 - adev->gfx.config.shader_engine_tile_size = 32; 2402 - adev->gfx.config.num_gpus = 1; 2403 - adev->gfx.config.multi_gpu_tile_size = 64; 2404 - 2405 - /* fix up row size */ 2406 - switch (adev->gfx.config.mem_row_size_in_kb) { 2407 - case 1: 2408 - default: 2409 - gb_addr_config = REG_SET_FIELD(gb_addr_config, GB_ADDR_CONFIG, ROW_SIZE, 0); 2410 - break; 2411 - case 2: 2412 - gb_addr_config = REG_SET_FIELD(gb_addr_config, GB_ADDR_CONFIG, ROW_SIZE, 1); 2413 - break; 2414 - case 4: 2415 - gb_addr_config = REG_SET_FIELD(gb_addr_config, GB_ADDR_CONFIG, ROW_SIZE, 2); 2416 - break; 2417 - } 2418 - adev->gfx.config.gb_addr_config = gb_addr_config; 2419 - 2420 - WREG32(mmGB_ADDR_CONFIG, gb_addr_config); 2421 - WREG32(mmHDP_ADDR_CONFIG, gb_addr_config); 2422 - WREG32(mmDMIF_ADDR_CALC, gb_addr_config); 2053 + WREG32(mmGB_ADDR_CONFIG, adev->gfx.config.gb_addr_config); 2054 + WREG32(mmHDP_ADDR_CONFIG, adev->gfx.config.gb_addr_config); 2055 + WREG32(mmDMIF_ADDR_CALC, adev->gfx.config.gb_addr_config); 2423 2056 WREG32(mmSDMA0_TILING_CONFIG + SDMA0_REGISTER_OFFSET, 2424 - gb_addr_config & 0x70); 2057 + adev->gfx.config.gb_addr_config & 0x70); 2425 2058 WREG32(mmSDMA0_TILING_CONFIG + SDMA1_REGISTER_OFFSET, 2426 - gb_addr_config & 0x70); 2427 - WREG32(mmUVD_UDEC_ADDR_CONFIG, gb_addr_config); 2428 - WREG32(mmUVD_UDEC_DB_ADDR_CONFIG, gb_addr_config); 2429 - WREG32(mmUVD_UDEC_DBW_ADDR_CONFIG, gb_addr_config); 2059 + adev->gfx.config.gb_addr_config & 0x70); 2060 + WREG32(mmUVD_UDEC_ADDR_CONFIG, adev->gfx.config.gb_addr_config); 2061 + WREG32(mmUVD_UDEC_DB_ADDR_CONFIG, adev->gfx.config.gb_addr_config); 2062 + WREG32(mmUVD_UDEC_DBW_ADDR_CONFIG, adev->gfx.config.gb_addr_config); 2430 2063 2431 2064 gfx_v8_0_tiling_mode_table_init(adev); 2432 2065 ··· 2263 2256 if (i == 0) { 2264 2257 tmp = REG_SET_FIELD(0, SH_MEM_CONFIG, DEFAULT_MTYPE, MTYPE_UC); 2265 2258 tmp = REG_SET_FIELD(tmp, SH_MEM_CONFIG, APE1_MTYPE, MTYPE_UC); 2266 - tmp = REG_SET_FIELD(tmp, SH_MEM_CONFIG, ALIGNMENT_MODE, 2259 + tmp = REG_SET_FIELD(tmp, SH_MEM_CONFIG, ALIGNMENT_MODE, 2267 2260 SH_MEM_ALIGNMENT_MODE_UNALIGNED); 2268 2261 WREG32(mmSH_MEM_CONFIG, tmp); 2269 2262 } else { 2270 2263 tmp = REG_SET_FIELD(0, SH_MEM_CONFIG, DEFAULT_MTYPE, MTYPE_NC); 2271 2264 tmp = REG_SET_FIELD(tmp, SH_MEM_CONFIG, APE1_MTYPE, MTYPE_NC); 2272 - tmp = REG_SET_FIELD(tmp, SH_MEM_CONFIG, ALIGNMENT_MODE, 2265 + tmp = REG_SET_FIELD(tmp, SH_MEM_CONFIG, ALIGNMENT_MODE, 2273 2266 SH_MEM_ALIGNMENT_MODE_UNALIGNED); 2274 2267 WREG32(mmSH_MEM_CONFIG, tmp); 2275 2268 }