drm/amdgpu: remove the check of init status in psp_ras_initialize
Subsystems (2)
PATCH 1/1 drm/amdgpu: remove the check of init status in psp_ras_initialize
The initialized status indicates RAS TA is loaded, but in some cases (such as RAS fatal error) RAS TA could be destroyed although it's not unloaded. Hence we load RAS TA unconditionally here.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3 -5
@@ -1526,11 +1526,6 @@ int psp_ras_initialize(struct psp_context *psp)if (amdgpu_sriov_vf (adev))return 0 ; -if (psp->ras_context.context.initialized) { -dev_warn (adev->dev,"RAS WARN: TA has already been loaded\n" ); -return 0 ; - } -if (!adev->psp.ras_context.context.bin_desc.size_bytes || !adev->psp.ras_context.context.bin_desc.start_addr) {dev_info (adev->dev,"RAS: optional ras ta ucode is not available\n" );
@@ -1602,6 +1597,9 @@ int psp_ras_initialize(struct psp_context *psp)else {if (ras_cmd->ras_status)dev_warn (psp->adev->dev,"RAS Init Status: 0x%X\n" , ras_cmd->ras_status); + +/* fail to load RAS TA */ + psp->ras_context.context.initialized = false; }return ret;
Signature · 1 line
2.35.1
[Public]
Thanks
Candice
________________________________
From: Zhou1, Tao <[email protected]>
Sent: Thursday, November 10, 2022 3:04:00 PM
To: [email protected] <[email protected]>; Li, Candice <[email protected]>; Zhang, Hawking <[email protected]>; Chai, Thomas <[email protected]>; Yang, Stanley <[email protected]>
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH] drm/amdgpu: remove the check of init status in psp_ras_initialize
The initialized status indicates RAS TA is loaded, but in some cases (such as RAS fatal error) RAS TA could be destroyed although it's not unloaded. Hence we load RAS TA unconditionally here.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +3 -5
@@ -1526,11 +1526,6 @@ int psp_ras_initialize(struct psp_context *psp)if (amdgpu_sriov_vf (adev))return 0 ; -if (psp->ras_context.context.initialized) { -dev_warn (adev->dev,"RAS WARN: TA has already been loaded\n" ); -return 0 ; - } -if (!adev->psp.ras_context.context.bin_desc.size_bytes || !adev->psp.ras_context.context.bin_desc.start_addr) {dev_info (adev->dev,"RAS: optional ras ta ucode is not available\n" );
@@ -1602,6 +1597,9 @@ int psp_ras_initialize(struct psp_context *psp)else {if (ras_cmd->ras_status)dev_warn (psp->adev->dev,"RAS Init Status: 0x%X\n" , ras_cmd->ras_status); + +/* fail to load RAS TA */ + psp->ras_context.context.initialized = false; }return ret;
--
2.35.1