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>
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;