drm/amdgpu/psp: Fix to get wrong xgmi session id
authorXiangliang Yu <Xiangliang.Yu@amd.com>
Thu, 13 Dec 2018 07:21:49 +0000 (15:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 14 Jan 2019 20:04:29 +0000 (15:04 -0500)
Driver get session id after loading TA FW and the session id is used
by driver instances to communicate with TA. PF and VF have different
session id.

xGMI session id should get from response buffer, correct it.

Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com>
Reviewed-by: Feifei Xu <Feifei.Xu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

index 8fab0d6..2f126ea 100644 (file)
@@ -147,6 +147,9 @@ psp_cmd_submit_buf(struct psp_context *psp,
                return -EINVAL;
        }
 
+       /* get xGMI session id from response buffer */
+       cmd->resp.session_id = psp->cmd_buf_mem->resp.session_id;
+
        if (ucode) {
                ucode->tmr_mc_addr_lo = psp->cmd_buf_mem->resp.fw_addr_lo;
                ucode->tmr_mc_addr_hi = psp->cmd_buf_mem->resp.fw_addr_hi;