Skip to contentSkip to conversation

drm/amdgpu/psp: Fail on VCN firmware load error

PATCH In review [email protected] 2 participants 2 messages Oct 5 – Oct 7

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

PATCH 1/1 drm/amdgpu/psp: Fail on VCN firmware load error

From: Boyuan Zhang <[email protected]>

Return an error when PSP reports a failure while loading VCN firmware, preventing GPU initialization from continuing with unavailable VCN firmware.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5 -1
index 04f6ebf31cca..1d853d2e8cc1 100644
@@ -784,9 +784,13 @@ psp_cmd_submit_buf(struct psp_context *psp,
 				psp->cmd_buf_mem->resp.status);
 		/* If any firmware (including CAP) load fails under SRIOV, it should
 		 * return failure to stop the VF from initializing.
+		 * A VCN firmware load failure must also stop initialization.
 		 * Also return failure in case of timeout
 		 */
-		if ((ucode && amdgpu_sriov_vf(psp->adev)) || !timeout) {
+		if ((ucode &&
+		    (amdgpu_sriov_vf(psp->adev) ||
+		    ucode->ucode_id == AMDGPU_UCODE_ID_VCN)) ||
+		    !timeout) {
 			ret = -EINVAL;
 			goto exit;
 		}
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw

AMD General

Quoted 42 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of [email protected]
Sent: Monday, October 5, 2026 2:33 PM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhang, Boyuan <[email protected]>
Subject: [PATCH] drm/amdgpu/psp: Fail on VCN firmware load error

From: Boyuan Zhang <[email protected]>

Return an error when PSP reports a failure while loading VCN firmware, preventing GPU initialization from continuing with unavailable VCN firmware.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +0 -0
index 04f6ebf31cca..1d853d2e8cc1 100644
@@ -784,9 +784,13 @@ psp_cmd_submit_buf(struct psp_context *psp,
                              psp->cmd_buf_mem->resp.status);
              /* If any firmware (including CAP) load fails under SRIOV, it

should
* return failure to stop the VF from initializing.

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +5 -2
+              * A VCN firmware load failure must also stop initialization.
               * Also return failure in case of timeout
               */
-             if ((ucode && amdgpu_sriov_vf(psp->adev)) || !timeout) {
+             if ((ucode &&
+                 (amdgpu_sriov_vf(psp->adev) ||
+                 ucode->ucode_id == AMDGPU_UCODE_ID_VCN)) ||
+                 !timeout) {
                      ret = -EINVAL;
                      goto exit;
              }
--

2.43.0