drm/amdkfd: hard-code cacheline for gc943,gc944
Subsystems (3)
PATCH 1/1 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]>
--- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/amd/amdkfd/kfd_crat.c +6 -0
@@ -1503,6 +1503,8 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,if (adev->gfx.config.gc_tcp_size_per_cu) { pcache_info[i].cache_size = adev->gfx.config.gc_tcp_size_per_cu; pcache_info[i].cache_level =1 ; +/* Cacheline size not available in IP discovery for gc943,gc944 */ + pcache_info[i].cache_line_size =128 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_DATA_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );
@@ -1514,6 +1516,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev, pcache_info[i].cache_size = adev->gfx.config.gc_l1_instruction_cache_size_per_sqc; pcache_info[i].cache_level =1 ; + pcache_info[i].cache_line_size =64 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_INST_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );
@@ -1524,6 +1527,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,if (adev->gfx.config.gc_l1_data_cache_size_per_sqc) { pcache_info[i].cache_size = adev->gfx.config.gc_l1_data_cache_size_per_sqc; pcache_info[i].cache_level =1 ; + pcache_info[i].cache_line_size =64 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_DATA_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );
@@ -1534,6 +1538,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,if (adev->gfx.config.gc_tcc_size) { pcache_info[i].cache_size = adev->gfx.config.gc_tcc_size; pcache_info[i].cache_level =2 ; + pcache_info[i].cache_line_size =128 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_DATA_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );
@@ -1544,6 +1549,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,if (adev->gmc.mall_size) { pcache_info[i].cache_size = adev->gmc.mall_size /1024 ; pcache_info[i].cache_level =3 ; + pcache_info[i].cache_line_size =64 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_DATA_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );
Signature · 1 line
2.34.1
Quoted 5 lines · David Yat Sin
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]>
Acked-by Alex Deucher <[email protected]>
Quoted 52 lines
--- drivers/gpu/drm/amd/amdkfd/kfd_crat.c | 6 ++++++ 1 file changed, 6 insertions(+)drivers/gpu/drm/amd/amdkfd/kfd_crat.c +6
-1@@ -1503,6 +1503,8 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,if (adev->gfx.config.gc_tcp_size_per_cu) { pcache_info[i].cache_size = adev->gfx.config.gc_tcp_size_per_cu; pcache_info[i].cache_level =1 ; +/* Cacheline size not available in IP discovery for gc943,gc944 */ + pcache_info[i].cache_line_size =128 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_DATA_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );@@ -1514,6 +1516,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev, pcache_info[i].cache_size = adev->gfx.config.gc_l1_instruction_cache_size_per_sqc; pcache_info[i].cache_level =1 ; + pcache_info[i].cache_line_size =64 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_INST_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );@@ -1524,6 +1527,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,if (adev->gfx.config.gc_l1_data_cache_size_per_sqc) { pcache_info[i].cache_size = adev->gfx.config.gc_l1_data_cache_size_per_sqc; pcache_info[i].cache_level =1 ; + pcache_info[i].cache_line_size =64 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_DATA_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );@@ -1534,6 +1538,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,if (adev->gfx.config.gc_tcc_size) { pcache_info[i].cache_size = adev->gfx.config.gc_tcc_size; pcache_info[i].cache_level =2 ; + pcache_info[i].cache_line_size =128 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_DATA_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE );@@ -1544,6 +1549,7 @@ static int kfd_fill_gpu_cache_info_from_gfx_config_v2(struct kfd_dev *kdev,if (adev->gmc.mall_size) { pcache_info[i].cache_size = adev->gmc.mall_size /1024 ; pcache_info[i].cache_level =3 ; + pcache_info[i].cache_line_size =64 ; pcache_info[i].flags = (CRAT_CACHE_FLAGS_ENABLED |CRAT_CACHE_FLAGS_DATA_CACHE |CRAT_CACHE_FLAGS_SIMD_CACHE ); --2.34.1