Skip to contentSkip to conversation

drm/amdgpu: Place psp pri_fw bo to VRAM on A+A

PATCH New Alex Deucher 1 participant 2 messages Apr 14

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: Place psp pri_fw bo to VRAM on A+A

From: Feifei Xu <[email protected]>

On A+A, psp requires firmware bo be placed on VRAM.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -1
index e48903df60118..5563f35e830b5 100644
@@ -529,7 +529,7 @@ static int psp_sw_init(struct amdgpu_ip_block *ip_block)
 	}
 
 	ret = amdgpu_bo_create_kernel(adev, PSP_1_MEG, PSP_1_MEG,
-				      (amdgpu_sriov_vf(adev) || adev->debug_use_vram_fw_buf) ?
+				      (amdgpu_sriov_vf(adev) || adev->debug_use_vram_fw_buf || adev->gmc.xgmi.connected_to_cpu) ?
 				      AMDGPU_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT,
 				      &psp->fw_pri_bo,
 				      &psp->fw_pri_mc_addr,
Signature · 1 line
2.53.0
author maintainer
#1 lore raw

PATCH 1/1 drm/amdgpu: make driver manages local vram allocations for for gmc v12.1 A+A

From: Le Ma <[email protected]>

Limit mc_vram_size to node_segment_size to prevent allocations to prevent allocations on remote HBM.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +4 -2
index e10ac9788d13a..5bdd4b9b78934 100644
@@ -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;
Signature · 1 line
2.53.0