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

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdkfd: update the cwsr area size for gfx950

Update cwsr area size for gfx950 to fit the new user queue buffer validation.
The size of LDS calculation is referred from gfx950 thunk implementation.

Signed-off-by: Le Ma <le.ma@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Le Ma and committed by
Alex Deucher
5a7c8c57 5690011a

+6 -4
+6 -4
drivers/gpu/drm/amd/amdkfd/kfd_queue.c
··· 394 394 395 395 if ((gfxv / 100 * 100) == 90400 || /* GFX_VERSION_AQUA_VANJARAM */ 396 396 gfxv == 90010 || /* GFX_VERSION_ALDEBARAN */ 397 - gfxv == 90008) /* GFX_VERSION_ARCTURUS */ 397 + gfxv == 90008 || /* GFX_VERSION_ARCTURUS */ 398 + gfxv == 90500) 398 399 vgpr_size = 0x80000; 399 400 else if (gfxv == 110000 || /* GFX_VERSION_PLUM_BONITO */ 400 401 gfxv == 110001 || /* GFX_VERSION_WHEAT_NAS */ ··· 406 405 return vgpr_size; 407 406 } 408 407 409 - #define WG_CONTEXT_DATA_SIZE_PER_CU(gfxv) \ 408 + #define WG_CONTEXT_DATA_SIZE_PER_CU(gfxv, props) \ 410 409 (kfd_get_vgpr_size_per_cu(gfxv) + SGPR_SIZE_PER_CU +\ 411 - LDS_SIZE_PER_CU + HWREG_SIZE_PER_CU) 410 + (((gfxv) == 90500) ? (props->lds_size_in_kb << 10) : LDS_SIZE_PER_CU) +\ 411 + HWREG_SIZE_PER_CU) 412 412 413 413 #define CNTL_STACK_BYTES_PER_WAVE(gfxv) \ 414 414 ((gfxv) >= 100100 ? 12 : 8) /* GFX_VERSION_NAVI10*/ ··· 433 431 min(cu_num * 40, props->array_count / props->simd_arrays_per_engine * 512) 434 432 : cu_num * 32; 435 433 436 - wg_data_size = ALIGN(cu_num * WG_CONTEXT_DATA_SIZE_PER_CU(gfxv), PAGE_SIZE); 434 + wg_data_size = ALIGN(cu_num * WG_CONTEXT_DATA_SIZE_PER_CU(gfxv, props), PAGE_SIZE); 437 435 ctl_stack_size = wave_num * CNTL_STACK_BYTES_PER_WAVE(gfxv) + 8; 438 436 ctl_stack_size = ALIGN(SIZEOF_HSA_USER_CONTEXT_SAVE_AREA_HEADER + ctl_stack_size, 439 437 PAGE_SIZE);