From: Le Ma Date: Wed, 25 Mar 2026 03:46:23 +0000 (+0800) Subject: drm/amdgpu: make driver manages local vram allocations for for gmc v12.1 A+A X-Git-Tag: v7.2-rc1~141^2~24^2~167 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=e773ce17b037c1bd9285758c78e18d0574b3e655;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: make driver manages local vram allocations for for gmc v12.1 A+A Limit mc_vram_size to node_segment_size to prevent allocations to prevent allocations on remote HBM. Signed-off-by: Le Ma Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index e10ac9788d13a..5bdd4b9b78934 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c @@ -729,8 +729,10 @@ static int gmc_v12_0_mc_init(struct amdgpu_device *adev) int r; if (adev->gmc.xgmi.connected_to_cpu) - adev->gmc.mc_vram_size = - adev->gmc.xgmi.node_segment_size * adev->gmc.xgmi.num_physical_nodes; + /* On A+A, manage driver allocation range to the local + * node segment and prevent allocations on remote HBM. + */ + adev->gmc.mc_vram_size = adev->gmc.xgmi.node_segment_size; else adev->gmc.mc_vram_size = adev->nbio.funcs->get_memsize(adev) * 1024ULL * 1024ULL;