diff options
author | Tao Zhou <tao.zhou1@amd.com> | 2019-07-22 08:27:25 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-07-31 15:50:23 -0400 |
commit | cf04dfd0e91f11ac83d369f809ada8147aeaf3fe (patch) | |
tree | 5571c317a14f29368f3c6d0ede45708449884e7a /drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |
parent | 8c94810357fad9d583e37785534a8caec558bb24 (diff) |
drm/amdgpu: allow ras interrupt callback to return error data
add error data as parameter for ras interrupt cb and process it
Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Dennis Li <dennis.li@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c index 143153a3c5b0..b248c8250d75 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | |||
@@ -1005,7 +1005,7 @@ static void amdgpu_ras_interrupt_handler(struct ras_manager *obj) | |||
1005 | struct ras_ih_data *data = &obj->ih_data; | 1005 | struct ras_ih_data *data = &obj->ih_data; |
1006 | struct amdgpu_iv_entry entry; | 1006 | struct amdgpu_iv_entry entry; |
1007 | int ret; | 1007 | int ret; |
1008 | struct ras_err_data err_data = {0, 0}; | 1008 | struct ras_err_data err_data = {0, 0, 0, NULL}; |
1009 | 1009 | ||
1010 | while (data->rptr != data->wptr) { | 1010 | while (data->rptr != data->wptr) { |
1011 | rmb(); | 1011 | rmb(); |
@@ -1020,14 +1020,14 @@ static void amdgpu_ras_interrupt_handler(struct ras_manager *obj) | |||
1020 | * from the callback to udpate the error type/count, etc | 1020 | * from the callback to udpate the error type/count, etc |
1021 | */ | 1021 | */ |
1022 | if (data->cb) { | 1022 | if (data->cb) { |
1023 | ret = data->cb(obj->adev, &entry); | 1023 | ret = data->cb(obj->adev, &err_data, &entry); |
1024 | /* ue will trigger an interrupt, and in that case | 1024 | /* ue will trigger an interrupt, and in that case |
1025 | * we need do a reset to recovery the whole system. | 1025 | * we need do a reset to recovery the whole system. |
1026 | * But leave IP do that recovery, here we just dispatch | 1026 | * But leave IP do that recovery, here we just dispatch |
1027 | * the error. | 1027 | * the error. |
1028 | */ | 1028 | */ |
1029 | if (ret == AMDGPU_RAS_UE) { | 1029 | if (ret == AMDGPU_RAS_UE) { |
1030 | obj->err_data.ue_count++; | 1030 | obj->err_data.ue_count += err_data.ue_count; |
1031 | } | 1031 | } |
1032 | /* Might need get ce count by register, but not all IP | 1032 | /* Might need get ce count by register, but not all IP |
1033 | * saves ce count, some IP just use one bit or two bits | 1033 | * saves ce count, some IP just use one bit or two bits |