Skip to content

Commit 55ed120

Browse files
dayatsin-amdalexdeucher
authored andcommitted
drm/amdkfd: hard-code cacheline for gc943,gc944
Cacheline size is not available in IP discovery for gc943,gc944. Signed-off-by: David Yat Sin <[email protected]> Reviewed-by: Harish Kasiviswanathan <[email protected]> Signed-off-by: Alex Deucher <[email protected]> Cc: [email protected]
1 parent 33114f1 commit 55ed120

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_crat.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1510,6 +1510,8 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,
15101510
if (adev->gfx.config.gc_tcp_size_per_cu) {
15111511
pcache_info[i].cache_size = adev->gfx.config.gc_tcp_size_per_cu;
15121512
pcache_info[i].cache_level = 1;
1513+
/* Cacheline size not available in IP discovery for gc943,gc944 */
1514+
pcache_info[i].cache_line_size = 128;
15131515
pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |
15141516
CRAT_CACHE_FLAGS_DATA_CACHE |
15151517
CRAT_CACHE_FLAGS_SIMD_CACHE);
@@ -1521,6 +1523,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,
15211523
pcache_info[i].cache_size =
15221524
adev->gfx.config.gc_l1_instruction_cache_size_per_sqc;
15231525
pcache_info[i].cache_level = 1;
1526+
pcache_info[i].cache_line_size = 64;
15241527
pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |
15251528
CRAT_CACHE_FLAGS_INST_CACHE |
15261529
CRAT_CACHE_FLAGS_SIMD_CACHE);
@@ -1531,6 +1534,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,
15311534
if (adev->gfx.config.gc_l1_data_cache_size_per_sqc) {
15321535
pcache_info[i].cache_size = adev->gfx.config.gc_l1_data_cache_size_per_sqc;
15331536
pcache_info[i].cache_level = 1;
1537+
pcache_info[i].cache_line_size = 64;
15341538
pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |
15351539
CRAT_CACHE_FLAGS_DATA_CACHE |
15361540
CRAT_CACHE_FLAGS_SIMD_CACHE);
@@ -1541,6 +1545,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,
15411545
if (adev->gfx.config.gc_tcc_size) {
15421546
pcache_info[i].cache_size = adev->gfx.config.gc_tcc_size;
15431547
pcache_info[i].cache_level = 2;
1548+
pcache_info[i].cache_line_size = 128;
15441549
pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |
15451550
CRAT_CACHE_FLAGS_DATA_CACHE |
15461551
CRAT_CACHE_FLAGS_SIMD_CACHE);
@@ -1551,6 +1556,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,
15511556
if (adev->gmc.mall_size) {
15521557
pcache_info[i].cache_size = adev->gmc.mall_size / 1024;
15531558
pcache_info[i].cache_level = 3;
1559+
pcache_info[i].cache_line_size = 64;
15541560
pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |
15551561
CRAT_CACHE_FLAGS_DATA_CACHE |
15561562
CRAT_CACHE_FLAGS_SIMD_CACHE);

0 commit comments

Comments
 (0)