Skip to contentSkip to conversation

drm/amdgpu: fill the ucode bo during psp resume for SRIOV

PATCH In review Victor Zhao 2 participants 3 messages Jan 6, 2025 – Jan 7, 2025

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

PATCH 1/1 drm/amdgpu: fill the ucode bo during psp resume for SRIOV

refill the ucode bo during psp resume for SRIOV, otherwise ucode load will fail after VM hibernation and fb clean.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -0
index 010c038b33ab..97fdd93c3ae3 100644
@@ -3148,6 +3148,10 @@ static int psp_resume(struct amdgpu_ip_block *ip_block)
 
 	mutex_lock(&adev->firmware.mutex);
 
+	ret = amdgpu_ucode_init_bo(adev);
+	if (ret)
+		goto failed;
+
 	ret = psp_hw_start(psp);
 	if (ret)
 		goto failed;
Signature · 1 line
2.34.1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Ping..

-----Original Message-----
From: Victor Zhao <[email protected]>
Sent: Monday, January 6, 2025 6:52 PM
To: [email protected]
Cc: Zhao, Victor <[email protected]>
Subject: [PATCH] drm/amdgpu: fill the ucode bo during psp resume for SRIOV

refill the ucode bo during psp resume for SRIOV, otherwise ucode load will fail after VM hibernation and fb clean.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -0
index 010c038b33ab..97fdd93c3ae3 100644
@@ -3148,6 +3148,10 @@ static int psp_resume(struct amdgpu_ip_block *ip_block)
 
        mutex_lock(&adev->firmware.mutex);
 
+       ret = amdgpu_ucode_init_bo(adev);
+       if (ret)
+               goto failed;
+
        ret = psp_hw_start(psp);
        if (ret)
                goto failed;

--
2.34.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Victor Zhao
Quoted 3 lines · Victor Zhao

refill the ucode bo during psp resume for SRIOV, otherwise ucode load will fail after VM hibernation and fb clean.

Please drop the comment above amdgpu_ucode_init_bo() in psp_hw_init() since it is no longer true. WIth that fixed, the patch is:

Quoted 24 lines
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -1
index 010c038b33ab..97fdd93c3ae3 100644
@@ -3148,6 +3148,10 @@ static int psp_resume(struct amdgpu_ip_block *ip_block)
 
        mutex_lock(&adev->firmware.mutex);
 
+       ret = amdgpu_ucode_init_bo(adev);
+       if (ret)
+               goto failed;
+
        ret = psp_hw_start(psp);
        if (ret)
                goto failed;
--

2.34.1