diff options
author | Hawking Zhang <Hawking.Zhang@amd.com> | 2019-12-23 11:51:42 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-02-06 23:04:36 +0300 |
commit | 0b9d37609a7b247bb70b15d28138e3e77b300c2a (patch) | |
tree | f500645ca0850bebd568e29b35b0e5c92176d698 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | |
parent | 1746d5a1d1a17dd389a00f335e2a1320feb4625b (diff) | |
download | linux-0b9d37609a7b247bb70b15d28138e3e77b300c2a.tar.xz |
drm/amdgpu: move xgmi init/fini to xgmi_add/remove_device call (v2)
For sriov, psp ip block has to be initialized before
ih block for the dynamic register programming interface
that needed for vf ih ring buffer. On the other hand,
current psp ip block hw_init function will initialize
xgmi session which actaully depends on interrupt to
return session context. This results an empty xgmi ta
session id and later failures on all the xgmi ta cmd
invoked from vf. xgmi ta session initialization has to
be done after ih ip block hw_init call.
to unify xgmi session init/fini for both bare-metal
sriov virtualization use scenario, move xgmi ta init
to xgmi_add_device call, and accordingly terminate xgmi
ta session in xgmi_remove_device call.
The existing suspend/resume sequence will not be changed.
v2: squash in return fix from Nirmoy
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Frank Min <Frank.Min@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h index 611021514c52..c77e1abb538a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h @@ -362,6 +362,8 @@ int psp_gpu_reset(struct amdgpu_device *adev); int psp_update_vcn_sram(struct amdgpu_device *adev, int inst_idx, uint64_t cmd_gpu_addr, int cmd_size); +int psp_xgmi_initialize(struct psp_context *psp); +int psp_xgmi_terminate(struct psp_context *psp); int psp_xgmi_invoke(struct psp_context *psp, uint32_t ta_cmd_id); int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id); |