Skip to content

Commit 8465f0a

Browse files
huangruialexdeucher
authored andcommitted
drm/amdgpu: remove mdelay in psp v12
Since secure firmware is more stable than bring up phase, I believe we don't need such mdelays any more before wait PSP response on PSP v12. Signed-off-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Trigger Huang <Trigger.Huang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 2d274bf commit 8465f0a

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,6 @@ static int psp_v12_0_bootloader_load_sysdrv(struct psp_context *psp)
9999
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_35,
100100
psp_gfxdrv_command_reg);
101101

102-
/* there might be handshake issue with hardware which needs delay */
103-
mdelay(20);
104-
105102
ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_35),
106103
0x80000000, 0x80000000, false);
107104

@@ -138,8 +135,6 @@ static int psp_v12_0_bootloader_load_sos(struct psp_context *psp)
138135
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_35,
139136
psp_gfxdrv_command_reg);
140137

141-
/* there might be handshake issue with hardware which needs delay */
142-
mdelay(20);
143138
ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_81),
144139
RREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_81),
145140
0, true);
@@ -161,7 +156,6 @@ static void psp_v12_0_reroute_ih(struct psp_context *psp)
161156
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_70, tmp);
162157
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, GFX_CTRL_CMD_ID_GBR_IH_SET);
163158

164-
mdelay(20);
165159
psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64),
166160
0x80000000, 0x8000FFFF, false);
167161

@@ -173,7 +167,6 @@ static void psp_v12_0_reroute_ih(struct psp_context *psp)
173167
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_70, tmp);
174168
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, GFX_CTRL_CMD_ID_GBR_IH_SET);
175169

176-
mdelay(20);
177170
psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64),
178171
0x80000000, 0x8000FFFF, false);
179172
}
@@ -200,9 +193,6 @@ static int psp_v12_0_ring_create(struct psp_context *psp,
200193
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_101,
201194
GFX_CTRL_CMD_ID_INIT_GPCOM_RING);
202195

203-
/* there might be handshake issue with hardware which needs delay */
204-
mdelay(20);
205-
206196
/* Wait for response flag (bit 31) in C2PMSG_101 */
207197
ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101),
208198
0x80000000, 0x8000FFFF, false);
@@ -222,9 +212,6 @@ static int psp_v12_0_ring_create(struct psp_context *psp,
222212
psp_ring_reg = psp_ring_reg << 16;
223213
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64, psp_ring_reg);
224214

225-
/* there might be handshake issue with hardware which needs delay */
226-
mdelay(20);
227-
228215
/* Wait for response flag (bit 31) in C2PMSG_64 */
229216
ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64),
230217
0x80000000, 0x8000FFFF, false);
@@ -247,9 +234,6 @@ static int psp_v12_0_ring_stop(struct psp_context *psp,
247234
WREG32_SOC15(MP0, 0, mmMP0_SMN_C2PMSG_64,
248235
GFX_CTRL_CMD_ID_DESTROY_RINGS);
249236

250-
/* there might be handshake issue with hardware which needs delay */
251-
mdelay(20);
252-
253237
/* Wait for response flag (bit 31) */
254238
if (amdgpu_sriov_vf(adev))
255239
ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_101),

0 commit comments

Comments
 (0)