Commit 570df4bc authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher

drm/amdgpu: Add reset_ras_error_count for jpeg v4_0_3

Add reset_ras_error_count callback for jpeg v4_0_3.
It will be used to reset jpeg ras error count.
Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarTao Zhou <tao.zhou1@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 41e491d8
...@@ -1024,3 +1024,25 @@ static void jpeg_v4_0_3_query_ras_error_count(struct amdgpu_device *adev, ...@@ -1024,3 +1024,25 @@ static void jpeg_v4_0_3_query_ras_error_count(struct amdgpu_device *adev,
for (i = 0; i < adev->jpeg.num_jpeg_inst; i++) for (i = 0; i < adev->jpeg.num_jpeg_inst; i++)
jpeg_v4_0_3_inst_query_ras_error_count(adev, i, ras_err_status); jpeg_v4_0_3_inst_query_ras_error_count(adev, i, ras_err_status);
} }
static void jpeg_v4_0_3_inst_reset_ras_error_count(struct amdgpu_device *adev,
uint32_t jpeg_inst)
{
amdgpu_ras_inst_reset_ras_error_count(adev,
jpeg_v4_0_3_ue_reg_list,
ARRAY_SIZE(jpeg_v4_0_3_ue_reg_list),
GET_INST(VCN, jpeg_inst));
}
static void jpeg_v4_0_3_reset_ras_error_count(struct amdgpu_device *adev)
{
uint32_t i;
if (!amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__JPEG)) {
dev_warn(adev->dev, "JPEG RAS is not supported\n");
return;
}
for (i = 0; i < adev->jpeg.num_jpeg_inst; i++)
jpeg_v4_0_3_inst_reset_ras_error_count(adev, i);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment