drm/amdgpu: output warning for unsupported ras error inject
Subsystems (2)
PATCH 1/1 drm/amdgpu: output warning for unsupported ras error inject
Output a warning message if RAS TA returns UNSUPPORTED_ERROR_INJ status.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ drivers/gpu/drm/amd/amdgpu/ta_ras_if.h | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3 -0
@@ -1328,6 +1328,9 @@ int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id)if (ras_cmd->ras_status ==TA_RAS_STATUS__ERROR_UNSUPPORTED_IP )dev_warn (psp->adev->dev,"RAS WARNING: cmd failed due to unsupported ip\n" ); +else if (ras_cmd->ras_status ==TA_RAS_STATUS__ERROR_UNSUPPORTED_ERROR_INJ ) +dev_warn (psp->adev->dev, +"RAS WARNING: cmd failed due to unsupported error injection\n" );else if (ras_cmd->ras_status)dev_warn (psp->adev->dev,"RAS WARNING: ras status = 0x%X\n" , ras_cmd->ras_status); }
drivers/gpu/drm/amd/amdgpu/ta_ras_if.h +6 -1
@@ -59,7 +59,12 @@ enum ta_ras_status {TA_RAS_STATUS__ERROR_SYS_DRV_REG_ACCESS =0xA011 ,TA_RAS_STATUS__ERROR_RAS_READ_WRITE =0xA012 ,TA_RAS_STATUS__ERROR_NULL_PTR =0xA013 , -TA_RAS_STATUS__ERROR_UNSUPPORTED_IP =0xA014 +TA_RAS_STATUS__ERROR_UNSUPPORTED_IP =0xA014 , +TA_RAS_STATUS__ERROR_PCS_STATE_QUIET =0xA015 , +TA_RAS_STATUS__ERROR_PCS_STATE_ERROR =0xA016 , +TA_RAS_STATUS__ERROR_PCS_STATE_HANG =0xA017 , +TA_RAS_STATUS__ERROR_PCS_STATE_UNKNOWN =0xA018 , +TA_RAS_STATUS__ERROR_UNSUPPORTED_ERROR_INJ =0xA019 }; enum ta_ras_block {
Signature · 1 line
2.17.1
[AMD Official Use Only]
Would it better create a function to interpret the RAS TA error? I expect more error status is available soon?
Regards,
Hawking
-----Original Message-----
From: Zhou1, Tao <[email protected]>
Sent: Friday, October 15, 2021 17:11
To: [email protected]; Clements, John <[email protected]>; Zhang, Hawking <[email protected]>; Yang, Stanley <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: output warning for unsupported ras error inject
Output a warning message if RAS TA returns UNSUPPORTED_ERROR_INJ status.
Signed-off-by Tao Zhou <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 3 +++ drivers/gpu/drm/amd/amdgpu/ta_ras_if.h | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3 -0
@@ -1328,6 +1328,9 @@ int psp_ras_invoke(struct psp_context *psp, uint32_t ta_cmd_id)if (ras_cmd->ras_status ==TA_RAS_STATUS__ERROR_UNSUPPORTED_IP )dev_warn (psp->adev->dev,"RAS WARNING: cmd failed due to unsupported ip\n" ); +else if (ras_cmd->ras_status ==TA_RAS_STATUS__ERROR_UNSUPPORTED_ERROR_INJ ) +dev_warn (psp->adev->dev, +"RAS WARNING: cmd failed due to unsupported error injection\n" );else if (ras_cmd->ras_status)dev_warn (psp->adev->dev,"RAS WARNING: ras status = 0x%X\n" , ras_cmd->ras_status); }
drivers/gpu/drm/amd/amdgpu/ta_ras_if.h +6 -1
@@ -59,7 +59,12 @@ enum ta_ras_status {TA_RAS_STATUS__ERROR_SYS_DRV_REG_ACCESS =0xA011 ,TA_RAS_STATUS__ERROR_RAS_READ_WRITE =0xA012 ,TA_RAS_STATUS__ERROR_NULL_PTR =0xA013 , -TA_RAS_STATUS__ERROR_UNSUPPORTED_IP =0xA014 +TA_RAS_STATUS__ERROR_UNSUPPORTED_IP =0xA014 , +TA_RAS_STATUS__ERROR_PCS_STATE_QUIET =0xA015 , +TA_RAS_STATUS__ERROR_PCS_STATE_ERROR =0xA016 , +TA_RAS_STATUS__ERROR_PCS_STATE_HANG =0xA017 , +TA_RAS_STATUS__ERROR_PCS_STATE_UNKNOWN =0xA018 , +TA_RAS_STATUS__ERROR_UNSUPPORTED_ERROR_INJ =0xA019 }; enum ta_ras_block {
--
2.17.1