drm/amdgpu: Add common helper to query ras error (v2)
authorHawking Zhang <Hawking.Zhang@amd.com>
Thu, 2 Feb 2023 12:54:08 +0000 (20:54 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:52:50 +0000 (09:52 -0400)
commit322a7e005db78b8a46ead91b7e3df3514cb658f0
tree276408571ad7de8db15342e4459eb89ab7aaf386
parentcbf9e46ab0fec29ac39d05d9a87fa66122bc9783
drm/amdgpu: Add common helper to query ras error (v2)

Add common helper to query ras error status and
log error information, including memory block id
and erorr count. The helpers are applicable to IP
blocks that follow the new ras error logging design.
For IP blocks that don't support the new design,
please still implement ip specific helper to query
ras error.

v2: optimize struct amdgpu_ras_err_status_reg_entry
and the implementaion in helper (Lijo/Tao)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.h