Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Candice Li <candice.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tao Zhou and committed by
Alex Deucher
3e931368 a1903b01

+3 -5
+3 -5
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
··· 1526 1526 if (amdgpu_sriov_vf(adev)) 1527 1527 return 0; 1528 1528 1529 - if (psp->ras_context.context.initialized) { 1530 - dev_warn(adev->dev, "RAS WARN: TA has already been loaded\n"); 1531 - return 0; 1532 - } 1533 - 1534 1529 if (!adev->psp.ras_context.context.bin_desc.size_bytes || 1535 1530 !adev->psp.ras_context.context.bin_desc.start_addr) { 1536 1531 dev_info(adev->dev, "RAS: optional ras ta ucode is not available\n"); ··· 1597 1602 else { 1598 1603 if (ras_cmd->ras_status) 1599 1604 dev_warn(psp->adev->dev, "RAS Init Status: 0x%X\n", ras_cmd->ras_status); 1605 + 1606 + /* fail to load RAS TA */ 1607 + psp->ras_context.context.initialized = false; 1600 1608 } 1601 1609 1602 1610 return ret;