Commit 17278169 authored by Kent Russell's avatar Kent Russell Committed by Alex Deucher

drm/amdkfd: Fix L2 cache size reporting in GFX9.4.3

Its currently incorrectly multiplied by number of XCCs in the partition

Fixes: be457b22 ("drm/amdkfd: Update cache info for GFX 9.4.3")
Signed-off-by: default avatarKent Russell <kent.russell@amd.com>
Reviewed-by: default avatarMukul Joshi <mukul.joshi@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 804bf74b
...@@ -1640,12 +1640,10 @@ static int fill_in_l2_l3_pcache(struct kfd_cache_properties **props_ext, ...@@ -1640,12 +1640,10 @@ static int fill_in_l2_l3_pcache(struct kfd_cache_properties **props_ext,
else else
mode = UNKNOWN_MEMORY_PARTITION_MODE; mode = UNKNOWN_MEMORY_PARTITION_MODE;
if (pcache->cache_level == 2) pcache->cache_size = pcache_info[cache_type].cache_size;
pcache->cache_size = pcache_info[cache_type].cache_size * num_xcc; /* Partition mode only affects L3 cache size */
else if (mode) if (mode && pcache->cache_level == 3)
pcache->cache_size = pcache_info[cache_type].cache_size / mode; pcache->cache_size /= mode;
else
pcache->cache_size = pcache_info[cache_type].cache_size;
if (pcache_info[cache_type].flags & CRAT_CACHE_FLAGS_DATA_CACHE) if (pcache_info[cache_type].flags & CRAT_CACHE_FLAGS_DATA_CACHE)
pcache->cache_type |= HSA_CACHE_TYPE_DATA; pcache->cache_type |= HSA_CACHE_TYPE_DATA;
......
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