Skip to contentSkip to conversation

drm/amdgpu: Allocate psp fw private buffer in vram

PATCH In review Hawking Zhang 2 participants 2 messages Aug 19, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Allocate psp fw private buffer in vram

It's not necessarily to allocate psp firmware private buffer in different memory domain in sriov and bare metal environment

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +1 -2
index 04dedf38eb0d..d53700c87a5e 100644
@@ -506,8 +506,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_GEM_DOMAIN_VRAM : AMDGPU_GEM_DOMAIN_GTT,
+				      AMDGPU_GEM_DOMAIN_VRAM,
 				      &psp->fw_pri_bo,
 				      &psp->fw_pri_mc_addr,
 				      &psp->fw_pri_buf);
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Quoted 34 lines

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Tuesday, August 19, 2025 4:31 PM
To: [email protected]; Ma, Le <[email protected]>
Cc: Zhang, Hawking <[email protected]>
Subject: [PATCH] drm/amdgpu: Allocate psp fw private buffer in vram

It's not necessarily to allocate psp firmware private buffer in different memory domain in sriov and bare metal environment

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -1
index 04dedf38eb0d..d53700c87a5e 100644
@@ -506,8 +506,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-
Quoted 1 line

debug_use_vram_fw_buf) ?

- AMDGPU_GEM_DOMAIN_VRAM :
AMDGPU_GEM_DOMAIN_GTT,
+ AMDGPU_GEM_DOMAIN_VRAM,

                                    &psp->fw_pri_bo,
                                    &psp->fw_pri_mc_addr,
                                    &psp->fw_pri_buf);

--
2.17.1