diff options
| author | Hawking Zhang <[email protected]> | 2023-01-22 14:22:06 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2023-06-09 13:53:15 +0000 |
| commit | a0cdb3d09332900e145fb99f52d1d571d7030183 (patch) | |
| tree | 3848a4a95fb5325026a6df099227e6b892964c24 /drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | |
| parent | drm/amdgpu: Add query_ras_error_count for mmhub v1_8 (diff) | |
| download | kernel-a0cdb3d09332900e145fb99f52d1d571d7030183.tar.gz kernel-a0cdb3d09332900e145fb99f52d1d571d7030183.zip | |
drm/amdgpu: Add reset_ras_error_count for mmhub v1_8
Add reset_ras_error_count callback for mmhub
v1_8. It will be used to reset mmhub ras error
count.
Signed-off-by: Hawking Zhang <[email protected]>
Reviewed-by: Tao Zhou <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c index 11240ca5ad83..f40a6a9f3c6d 100644 --- a/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c +++ b/drivers/gpu/drm/amd/amdgpu/mmhub_v1_8.c @@ -672,3 +672,31 @@ static void mmhub_v1_8_query_ras_error_count(struct amdgpu_device *adev, for_each_inst(i, inst_mask) mmhub_v1_8_inst_query_ras_error_count(adev, i, ras_err_status); } + +static void mmhub_v1_8_inst_reset_ras_error_count(struct amdgpu_device *adev, + uint32_t mmhub_inst) +{ + amdgpu_ras_inst_reset_ras_error_count(adev, + mmhub_v1_8_ce_reg_list, + ARRAY_SIZE(mmhub_v1_8_ce_reg_list), + mmhub_inst); + amdgpu_ras_inst_reset_ras_error_count(adev, + mmhub_v1_8_ue_reg_list, + ARRAY_SIZE(mmhub_v1_8_ue_reg_list), + mmhub_inst); +} + +static void mmhub_v1_8_reset_ras_error_count(struct amdgpu_device *adev) +{ + uint32_t inst_mask; + uint32_t i; + + if (!amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__MMHUB)) { + dev_warn(adev->dev, "MMHUB RAS is not supported\n"); + return; + } + + inst_mask = adev->aid_mask; + for_each_inst(i, inst_mask) + mmhub_v1_8_inst_reset_ras_error_count(adev, i); +} |
