]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: make driver manages local vram allocations for for gmc v12.1 A+A
authorLe Ma <le.ma@amd.com>
Wed, 25 Mar 2026 03:46:23 +0000 (11:46 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 17 Apr 2026 19:41:14 +0000 (15:41 -0400)
Limit mc_vram_size to node_segment_size to prevent allocations
to prevent allocations on remote HBM.

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c

index e10ac9788d13a7c3414ae5779ce4801a7af86e61..5bdd4b9b789346cd8967f3ef415ef175fcb3ba68 100644 (file)
@@ -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;