On Wed, Jan 8, 2020 at 11:17 AM Hawking Zhang <Hawking.Zhang@xxxxxxx> wrote: > > invoke sdma query_ras_error_count to get sdma single > bit error count > > Change-Id: Iaaa86bb79dc28fe714937ca832da8a1cb5541930 > Signed-off-by: Hawking Zhang <Hawking.Zhang@xxxxxxx> > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > index c7cee9716bdb..ac9926b3f9fe 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c > @@ -686,6 +686,7 @@ int amdgpu_ras_error_query(struct amdgpu_device *adev, > { > struct ras_manager *obj = amdgpu_ras_find_obj(adev, &info->head); > struct ras_err_data err_data = {0, 0, 0, NULL}; > + int i; > > if (!obj) > return -EINVAL; > @@ -700,6 +701,12 @@ int amdgpu_ras_error_query(struct amdgpu_device *adev, > if (adev->umc.funcs->query_ras_error_address) > adev->umc.funcs->query_ras_error_address(adev, &err_data); > break; > + case AMDGPU_RAS_BLOCK__SDMA: > + if (adev->sdma.funcs->query_ras_error_count) { > + for (i = 0; i < adev->sdma.num_instances; i++) > + adev->sdma.funcs->query_ras_error_count(adev, i, &err_data); Looks like the indentation is off here. With that fixed: Reviewed-by: Alex Deucher <alexander.deucher@xxxxxxx> > + } > + break; > case AMDGPU_RAS_BLOCK__GFX: > if (adev->gfx.funcs->query_ras_error_count) > adev->gfx.funcs->query_ras_error_count(adev, &err_data); > -- > 2.17.1 > > _______________________________________________ > amd-gfx mailing list > amd-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/amd-gfx _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx