提交 4bef1abe 编写于 作者: A Alice Wong 提交者: Alex Deucher

drm/amdgpu/psp: Return failure when firmware failed to load in SRIOV

In SRIOV, PSP will block incompatible firmware from loading. When this happens,
driver should be prevented from continue initialization and start cleanup.
Return failure in psp_cmd_submit_buf when firmware load failed in SRIOV.
Signed-off-by: NAlice Wong <shiwei.wong@amd.com>
Reviewed-by: NSashank Saye <sashank.saye@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 3cc69021
...@@ -630,10 +630,11 @@ psp_cmd_submit_buf(struct psp_context *psp, ...@@ -630,10 +630,11 @@ psp_cmd_submit_buf(struct psp_context *psp,
DRM_WARN("psp gfx command %s(0x%X) failed and response status is (0x%X)\n", DRM_WARN("psp gfx command %s(0x%X) failed and response status is (0x%X)\n",
psp_gfx_cmd_name(psp->cmd_buf_mem->cmd_id), psp->cmd_buf_mem->cmd_id, psp_gfx_cmd_name(psp->cmd_buf_mem->cmd_id), psp->cmd_buf_mem->cmd_id,
psp->cmd_buf_mem->resp.status); psp->cmd_buf_mem->resp.status);
/* If we load CAP FW, PSP must return 0 under SRIOV /* If any firmware (including CAP) load fails under SRIOV, it should
* also return failure in case of timeout * return failure to stop the VF from initializing.
* Also return failure in case of timeout
*/ */
if ((ucode && (ucode->ucode_id == AMDGPU_UCODE_ID_CAP)) || !timeout) { if ((ucode && amdgpu_sriov_vf(psp->adev)) || !timeout) {
ret = -EINVAL; ret = -EINVAL;
goto exit; goto exit;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册