mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
drm/amdgpu: add support for ras init flags
conditionally configure ras for dgpu mode or poison propogation mode Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: John Clements <john.clements@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
6effe77972
commit
7e882aee84
|
|
@ -1037,6 +1037,13 @@ static int psp_ras_load(struct psp_context *psp)
|
|||
memset(psp->fw_pri_buf, 0, PSP_1_MEG);
|
||||
memcpy(psp->fw_pri_buf, psp->ta_ras_start_addr, psp->ta_ras_ucode_size);
|
||||
|
||||
ras_cmd = (struct ta_ras_shared_memory *)psp->ras.ras_shared_buf;
|
||||
|
||||
if (psp->adev->gmc.xgmi.connected_to_cpu)
|
||||
ras_cmd->ras_in_message.init_flags.poison_mode_en = 1;
|
||||
else
|
||||
ras_cmd->ras_in_message.init_flags.dgpu_mode = 1;
|
||||
|
||||
psp_prep_ta_load_cmd_buf(cmd,
|
||||
psp->fw_pri_mc_addr,
|
||||
psp->ta_ras_ucode_size,
|
||||
|
|
@ -1046,8 +1053,6 @@ static int psp_ras_load(struct psp_context *psp)
|
|||
ret = psp_cmd_submit_buf(psp, NULL, cmd,
|
||||
psp->fence_buf_mc_addr);
|
||||
|
||||
ras_cmd = (struct ta_ras_shared_memory *)psp->ras.ras_shared_buf;
|
||||
|
||||
if (!ret) {
|
||||
psp->ras.session_id = cmd->resp.session_id;
|
||||
|
||||
|
|
|
|||
|
|
@ -105,6 +105,12 @@ struct ta_ras_trigger_error_input {
|
|||
uint64_t value; // method if error injection. i.e persistent, coherent etc.
|
||||
};
|
||||
|
||||
struct ta_ras_init_flags
|
||||
{
|
||||
uint8_t poison_mode_en;
|
||||
uint8_t dgpu_mode;
|
||||
};
|
||||
|
||||
struct ta_ras_output_flags
|
||||
{
|
||||
uint8_t ras_init_success_flag;
|
||||
|
|
@ -115,6 +121,7 @@ struct ta_ras_output_flags
|
|||
/* Common input structure for RAS callbacks */
|
||||
/**********************************************************/
|
||||
union ta_ras_cmd_input {
|
||||
struct ta_ras_init_flags init_flags;
|
||||
struct ta_ras_enable_features_input enable_features;
|
||||
struct ta_ras_disable_features_input disable_features;
|
||||
struct ta_ras_trigger_error_input trigger_error;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user