Skip to content

Commit 0a5c060

Browse files
Tim Huangalexdeucher
authored andcommitted
drm/amdgpu: fix incorrect MALL size for GFX1151
On GFX1151, the reported MALL cache size reflects only half of its actual size; this adjustment corrects the discrepancy. Signed-off-by: Tim Huang <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Yifan Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 4367ee3 commit 0a5c060

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,18 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
748748
adev->gmc.vram_type = vram_type;
749749
adev->gmc.vram_vendor = vram_vendor;
750750

751+
/* The mall_size is already calculated as mall_size_per_umc * num_umc.
752+
* However, for gfx1151, which features a 2-to-1 UMC mapping,
753+
* the result must be multiplied by 2 to determine the actual mall size.
754+
*/
755+
switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
756+
case IP_VERSION(11, 5, 1):
757+
adev->gmc.mall_size *= 2;
758+
break;
759+
default:
760+
break;
761+
}
762+
751763
switch (amdgpu_ip_version(adev, GC_HWIP, 0)) {
752764
case IP_VERSION(11, 0, 0):
753765
case IP_VERSION(11, 0, 1):

0 commit comments

Comments
 (0)