drm/amdgpu: loose check for umc poison mode
Subsystems (2)
PATCH 1/1 drm/amdgpu: loose check for umc poison mode
No need to check poison setting for each channel, check for umc0 channel0 is enough.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +5 -13
@@ -451,21 +451,13 @@ static uint32_t umc_v6_7_query_ras_poison_mode_per_channel(static bool umc_v6_7_query_ras_poison_mode (struct amdgpu_device *adev) { -uint32_t umc_inst =0 ; -uint32_t ch_inst =0 ;uint32_t umc_reg_offset =0 ; - LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst); -/* Enabling fatal error in one channel will be considered -as fatal error mode */ -if (umc_v6_7_query_ras_poison_mode_per_channel (adev, umc_reg_offset)) -return false; - } - -return true; +/* Enabling fatal error in umc instance0 channel0 will be +* considered as fatal error mode +*/ + umc_reg_offset =get_umc_v6_7_reg_offset (adev,0 ,0 ); +return !umc_v6_7_query_ras_poison_mode_per_channel (adev, umc_reg_offset); }const struct amdgpu_ras_block_hw_ops umc_v6_7_ras_hw_ops = {
Signature · 1 line
2.17.1
[AMD Official Use Only]
Reviewed-by Hawking Zhang <[email protected]>
Regards,
Hawking
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Thursday, February 10, 2022 16:23
To: [email protected]; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>; Chai, Thomas <[email protected]>; Clements, John <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: loose check for umc poison mode
No need to check poison setting for each channel, check for umc0 channel0 is enough.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/umc_v6_7.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-)
drivers/gpu/drm/amd/amdgpu/umc_v6_7.c +6 -14
@@ -451,21 +451,13 @@ static uint32_t umc_v6_7_query_ras_poison_mode_per_channel(static bool umc_v6_7_query_ras_poison_mode (struct amdgpu_device *adev) { -uint32_t umc_inst =0 ; -uint32_t ch_inst =0 ;uint32_t umc_reg_offset =0 ; - LOOP_UMC_INST_AND_CH(umc_inst, ch_inst) { - umc_reg_offset =get_umc_v6_7_reg_offset (adev, - umc_inst, - ch_inst); -/* Enabling fatal error in one channel will be considered -as fatal error mode */ -if (umc_v6_7_query_ras_poison_mode_per_channel (adev, umc_reg_offset)) -return false; - } - -return true; +/* Enabling fatal error in umc instance0 channel0 will be +* considered as fatal error mode +*/ + umc_reg_offset =get_umc_v6_7_reg_offset (adev,0 ,0 ); +return !umc_v6_7_query_ras_poison_mode_per_channel (adev, +umc_reg_offset); }const struct amdgpu_ras_block_hw_ops umc_v6_7_ras_hw_ops = { --
2.17.1