aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorxinhui pan <xinhui.pan@amd.com>2018-10-30 01:44:46 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-03-19 16:36:50 -0400
commit7da674535da997c1d271a9cda522989f46909858 (patch)
tree06c4034bdd3f3614dad451d0d9f6715f631bedaa /drivers/gpu/drm
parent58b22e0b0ead2a4b5f3ec3d1375256d8601f7216 (diff)
drm/amdgpu: add psp ras callback func and macro
Define the driver side interface for ras ta. Acked-by: Hawking Zhang <Hawking.Zhang@amd.com> 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')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
index 49c3942e469c..3e6fcc9cdef0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.h
@@ -28,6 +28,7 @@
28#include "amdgpu.h" 28#include "amdgpu.h"
29#include "psp_gfx_if.h" 29#include "psp_gfx_if.h"
30#include "ta_xgmi_if.h" 30#include "ta_xgmi_if.h"
31#include "ta_ras_if.h"
31 32
32#define PSP_FENCE_BUFFER_SIZE 0x1000 33#define PSP_FENCE_BUFFER_SIZE 0x1000
33#define PSP_CMD_BUFFER_SIZE 0x1000 34#define PSP_CMD_BUFFER_SIZE 0x1000
@@ -88,6 +89,9 @@ struct psp_funcs
88 int (*xgmi_set_topology_info)(struct psp_context *psp, int number_devices, 89 int (*xgmi_set_topology_info)(struct psp_context *psp, int number_devices,
89 struct psp_xgmi_topology_info *topology); 90 struct psp_xgmi_topology_info *topology);
90 bool (*support_vmr_ring)(struct psp_context *psp); 91 bool (*support_vmr_ring)(struct psp_context *psp);
92 int (*ras_trigger_error)(struct psp_context *psp,
93 struct ta_ras_trigger_error_input *info);
94 int (*ras_cure_posion)(struct psp_context *psp, uint64_t *mode_ptr);
91}; 95};
92 96
93struct psp_xgmi_context { 97struct psp_xgmi_context {
@@ -211,6 +215,13 @@ struct psp_xgmi_topology_info {
211 215
212#define amdgpu_psp_check_fw_loading_status(adev, i) (adev)->firmware.funcs->check_fw_loading_status((adev), (i)) 216#define amdgpu_psp_check_fw_loading_status(adev, i) (adev)->firmware.funcs->check_fw_loading_status((adev), (i))
213 217
218#define psp_ras_trigger_error(psp, info) \
219 ((psp)->funcs->ras_trigger_error ? \
220 (psp)->funcs->ras_trigger_error((psp), (info)) : -EINVAL)
221#define psp_ras_cure_posion(psp, addr) \
222 ((psp)->funcs->ras_cure_posion ? \
223 (psp)->funcs->ras_cure_posion(psp, (addr)) : -EINVAL)
224
214extern const struct amd_ip_funcs psp_ip_funcs; 225extern const struct amd_ip_funcs psp_ip_funcs;
215 226
216extern const struct amdgpu_ip_block_version psp_v3_1_ip_block; 227extern const struct amdgpu_ip_block_version psp_v3_1_ip_block;