Skip to content

Commit 2d73b08

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]> (cherry picked from commit 0a5c060) Cc: [email protected]
1 parent a0fa787 commit 2d73b08

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
@@ -752,6 +752,18 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block *ip_block)
752752
adev->gmc.vram_type = vram_type;
753753
adev->gmc.vram_vendor = vram_vendor;
754754

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

0 commit comments

Comments
 (0)