drm/amdgpu/gmc12: Init vram_size for A + A

Calculate vram_size using the XGMI node segment size
and node count for A+A configurations

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Hawking Zhang
2026-03-17 10:32:54 -04:00
committed by Alex Deucher
parent 93d82ed35d
commit 25aa39a863
+7 -3
View File
@@ -728,9 +728,13 @@ static int gmc_v12_0_mc_init(struct amdgpu_device *adev)
{
int r;
/* size in MB on si */
adev->gmc.mc_vram_size =
adev->nbio.funcs->get_memsize(adev) * 1024ULL * 1024ULL;
if (adev->gmc.xgmi.connected_to_cpu)
adev->gmc.mc_vram_size =
adev->gmc.xgmi.node_segment_size * adev->gmc.xgmi.num_physical_nodes;
else
adev->gmc.mc_vram_size =
adev->nbio.funcs->get_memsize(adev) * 1024ULL * 1024ULL;
adev->gmc.real_vram_size = adev->gmc.mc_vram_size;
if (!(adev->flags & AMD_IS_APU) &&