@@ -60,7 +60,7 @@ MODULE_FIRMWARE("amdgpu/psp_14_0_0_ta.bin");
6060#define GFX_CMD_USB_PD_USE_LFB 0x480
6161
6262/* Retry times for vmbx ready wait */
63- #define PSP_VMBX_POLLING_LIMIT 20000
63+ #define PSP_VMBX_POLLING_LIMIT 3000
6464
6565/* VBIOS gfl defines */
6666#define MBOX_READY_MASK 0x80000000
@@ -161,14 +161,18 @@ static int psp_v13_0_wait_for_vmbx_ready(struct psp_context *psp)
161161static int psp_v13_0_wait_for_bootloader (struct psp_context * psp )
162162{
163163 struct amdgpu_device * adev = psp -> adev ;
164- int retry_loop , ret ;
164+ int retry_loop , retry_cnt , ret ;
165165
166+ retry_cnt =
167+ (amdgpu_ip_version (adev , MP0_HWIP , 0 ) == IP_VERSION (13 , 0 , 6 )) ?
168+ PSP_VMBX_POLLING_LIMIT :
169+ 10 ;
166170 /* Wait for bootloader to signify that it is ready having bit 31 of
167171 * C2PMSG_35 set to 1. All other bits are expected to be cleared.
168172 * If there is an error in processing command, bits[7:0] will be set.
169173 * This is applicable for PSP v13.0.6 and newer.
170174 */
171- for (retry_loop = 0 ; retry_loop < PSP_VMBX_POLLING_LIMIT ; retry_loop ++ ) {
175+ for (retry_loop = 0 ; retry_loop < retry_cnt ; retry_loop ++ ) {
172176 ret = psp_wait_for (
173177 psp , SOC15_REG_OFFSET (MP0 , 0 , regMP0_SMN_C2PMSG_35 ),
174178 0x80000000 , 0xffffffff , false);
@@ -821,7 +825,7 @@ static int psp_v13_0_query_boot_status(struct psp_context *psp)
821825 if (amdgpu_ip_version (adev , MP0_HWIP , 0 ) != IP_VERSION (13 , 0 , 6 ))
822826 return 0 ;
823827
824- if (RREG32_SOC15 (MP0 , 0 , regMP0_SMN_C2PMSG_59 ) < 0x00a10007 )
828+ if (RREG32_SOC15 (MP0 , 0 , regMP0_SMN_C2PMSG_59 ) < 0x00a10109 )
825829 return 0 ;
826830
827831 for_each_inst (i , inst_mask ) {
0 commit comments