Skip to content

Commit 156c281

Browse files
Yang Wangalexdeucher
authored andcommitted
drm/amdgpu: add RAS error info support for gfx_v9_4_3
add RAS error info support for gfx_v9_4_3. Signed-off-by: Yang Wang <[email protected]> Reviewed-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent dd401cd commit 156c281

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3766,6 +3766,12 @@ static void gfx_v9_4_3_inst_query_ras_err_count(struct amdgpu_device *adev,
37663766
unsigned long ce_count = 0, ue_count = 0;
37673767
uint32_t i, j, k;
37683768

3769+
/* NOTE: convert xcc_id to physical XCD ID (XCD0 or XCD1) */
3770+
struct amdgpu_smuio_mcm_config_info mcm_info = {
3771+
.socket_id = adev->smuio.funcs->get_socket_id(adev),
3772+
.die_id = xcc_id & 0x01 ? 1 : 0,
3773+
};
3774+
37693775
mutex_lock(&adev->grbm_idx_mutex);
37703776

37713777
for (i = 0; i < ARRAY_SIZE(gfx_v9_4_3_ce_reg_list); i++) {
@@ -3804,8 +3810,8 @@ static void gfx_v9_4_3_inst_query_ras_err_count(struct amdgpu_device *adev,
38043810
/* the caller should make sure initialize value of
38053811
* err_data->ue_count and err_data->ce_count
38063812
*/
3807-
err_data->ce_count += ce_count;
3808-
err_data->ue_count += ue_count;
3813+
amdgpu_ras_error_statistic_ue_count(err_data, &mcm_info, ue_count);
3814+
amdgpu_ras_error_statistic_ce_count(err_data, &mcm_info, ce_count);
38093815
}
38103816

38113817
static void gfx_v9_4_3_inst_reset_ras_err_count(struct amdgpu_device *adev,

0 commit comments

Comments
 (0)