Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

John Clements and committed by
Alex Deucher
7e882aee 6effe779

+14 -2
+7 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
··· 1037 1037 memset(psp->fw_pri_buf, 0, PSP_1_MEG); 1038 1038 memcpy(psp->fw_pri_buf, psp->ta_ras_start_addr, psp->ta_ras_ucode_size); 1039 1039 1040 + ras_cmd = (struct ta_ras_shared_memory *)psp->ras.ras_shared_buf; 1041 + 1042 + if (psp->adev->gmc.xgmi.connected_to_cpu) 1043 + ras_cmd->ras_in_message.init_flags.poison_mode_en = 1; 1044 + else 1045 + ras_cmd->ras_in_message.init_flags.dgpu_mode = 1; 1046 + 1040 1047 psp_prep_ta_load_cmd_buf(cmd, 1041 1048 psp->fw_pri_mc_addr, 1042 1049 psp->ta_ras_ucode_size, ··· 1052 1045 1053 1046 ret = psp_cmd_submit_buf(psp, NULL, cmd, 1054 1047 psp->fence_buf_mc_addr); 1055 - 1056 - ras_cmd = (struct ta_ras_shared_memory *)psp->ras.ras_shared_buf; 1057 1048 1058 1049 if (!ret) { 1059 1050 psp->ras.session_id = cmd->resp.session_id;
+7
drivers/gpu/drm/amd/amdgpu/ta_ras_if.h
··· 105 105 uint64_t value; // method if error injection. i.e persistent, coherent etc. 106 106 }; 107 107 108 + struct ta_ras_init_flags 109 + { 110 + uint8_t poison_mode_en; 111 + uint8_t dgpu_mode; 112 + }; 113 + 108 114 struct ta_ras_output_flags 109 115 { 110 116 uint8_t ras_init_success_flag; ··· 121 115 /* Common input structure for RAS callbacks */ 122 116 /**********************************************************/ 123 117 union ta_ras_cmd_input { 118 + struct ta_ras_init_flags init_flags; 124 119 struct ta_ras_enable_features_input enable_features; 125 120 struct ta_ras_disable_features_input disable_features; 126 121 struct ta_ras_trigger_error_input trigger_error;