mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-24 14:29:38 +07:00
drm/amdgpu: refine sdma4 ras_data_cb
simplify code logic and refine return value v2: remove unused error source code Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
4c65dd1041
commit
fc04e6b484
@ -1942,28 +1942,18 @@ static int sdma_v4_0_process_ras_data_cb(struct amdgpu_device *adev,
|
|||||||
void *err_data,
|
void *err_data,
|
||||||
struct amdgpu_iv_entry *entry)
|
struct amdgpu_iv_entry *entry)
|
||||||
{
|
{
|
||||||
uint32_t err_source;
|
|
||||||
int instance;
|
int instance;
|
||||||
|
|
||||||
if (!amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX)) {
|
if (amdgpu_ras_is_supported(adev, AMDGPU_RAS_BLOCK__GFX))
|
||||||
instance = sdma_v4_0_irq_id_to_seq(entry->client_id);
|
goto out;
|
||||||
if (instance < 0)
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
switch (entry->src_id) {
|
instance = sdma_v4_0_irq_id_to_seq(entry->client_id);
|
||||||
case SDMA0_4_0__SRCID__SDMA_SRAM_ECC:
|
if (instance < 0)
|
||||||
err_source = 0;
|
goto out;
|
||||||
break;
|
|
||||||
case SDMA0_4_0__SRCID__SDMA_ECC:
|
|
||||||
err_source = 1;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
amdgpu_sdma_process_ras_data_cb(adev, err_data, entry);
|
amdgpu_sdma_process_ras_data_cb(adev, err_data, entry);
|
||||||
}
|
|
||||||
|
|
||||||
|
out:
|
||||||
return AMDGPU_RAS_SUCCESS;
|
return AMDGPU_RAS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user