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.
Signed-off-by: Boyuan Zhang <[email protected]> --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 04f6ebf31cca..1d853d2e8cc1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -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; } -- 2.43.0
