diff options
author | xinhui pan <xinhui.pan@amd.com> | 2018-11-21 11:17:49 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-03-19 15:36:50 -0500 |
commit | 5e5d3154575c42a4adaf4bcdec2b657f9e1e7644 (patch) | |
tree | 7fdf5dd673dbdb139dc3480bd545bc43c8a87936 /drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h | |
parent | 7da674535da997c1d271a9cda522989f46909858 (diff) | |
download | linux-stable-5e5d3154575c42a4adaf4bcdec2b657f9e1e7644.tar.gz linux-stable-5e5d3154575c42a4adaf4bcdec2b657f9e1e7644.tar.bz2 linux-stable-5e5d3154575c42a4adaf4bcdec2b657f9e1e7644.zip |
drm/amdgpu: add psp ras subsystem infrastructure (v2)
Add ras fw loading, init, terminate.
Add ras cmd submit helper.
Add ras feature enable/disable common function.
v2: squash in unused variable warning fix
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h index 3e6fcc9cdef0..9c067e760a5f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h @@ -34,6 +34,7 @@ #define PSP_CMD_BUFFER_SIZE 0x1000 #define PSP_ASD_SHARED_MEM_SIZE 0x4000 #define PSP_XGMI_SHARED_MEM_SIZE 0x4000 +#define PSP_RAS_SHARED_MEM_SIZE 0x4000 #define PSP_1_MEG 0x100000 #define PSP_TMR_SIZE 0x400000 @@ -102,6 +103,15 @@ struct psp_xgmi_context { void *xgmi_shared_buf; }; +struct psp_ras_context { + /*ras fw*/ + bool ras_initialized; + uint32_t session_id; + struct amdgpu_bo *ras_shared_bo; + uint64_t ras_shared_mc_addr; + void *ras_shared_buf; +}; + struct psp_context { struct amdgpu_device *adev; @@ -162,6 +172,7 @@ struct psp_context uint32_t ta_ras_ucode_size; uint8_t *ta_ras_start_addr; struct psp_xgmi_context xgmi_context; + struct psp_ras_context ras; }; struct amdgpu_psp_funcs { @@ -232,6 +243,11 @@ extern const struct amdgpu_ip_block_version psp_v10_0_ip_block; int psp_gpu_reset(struct amdgpu_device *adev); 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); +int psp_ras_enable_features(struct psp_context *psp, + union ta_ras_cmd_input *info, bool enable); + extern const struct amdgpu_ip_block_version psp_v11_0_ip_block; #endif |