Commit b3256385 authored by Victor Lu's avatar Victor Lu Committed by Alex Deucher

drm/amdgpu: Do not wait for MP0_C2PMSG_33 IFWI init in SRIOV

SRIOV does not need to wait for IFWI init, and MP0_C2PMSG_33 is blocked
for VF access.
Signed-off-by: default avatarVictor Lu <victorchengchi.lu@amd.com>
Reviewed-by: default avatarVignesh Chander <Vignesh.Chander@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4b5b855c
...@@ -260,19 +260,21 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev, ...@@ -260,19 +260,21 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
u32 msg; u32 msg;
int i, ret = 0; int i, ret = 0;
/* It can take up to a second for IFWI init to complete on some dGPUs, if (!amdgpu_sriov_vf(adev)) {
* but generally it should be in the 60-100ms range. Normally this starts /* It can take up to a second for IFWI init to complete on some dGPUs,
* as soon as the device gets power so by the time the OS loads this has long * but generally it should be in the 60-100ms range. Normally this starts
* completed. However, when a card is hotplugged via e.g., USB4, we need to * as soon as the device gets power so by the time the OS loads this has long
* wait for this to complete. Once the C2PMSG is updated, we can * completed. However, when a card is hotplugged via e.g., USB4, we need to
* continue. * wait for this to complete. Once the C2PMSG is updated, we can
*/ * continue.
*/
for (i = 0; i < 1000; i++) { for (i = 0; i < 1000; i++) {
msg = RREG32(mmMP0_SMN_C2PMSG_33); msg = RREG32(mmMP0_SMN_C2PMSG_33);
if (msg & 0x80000000) if (msg & 0x80000000)
break; break;
usleep_range(1000, 1100); usleep_range(1000, 1100);
}
} }
vram_size = (uint64_t)RREG32(mmRCC_CONFIG_MEMSIZE) << 20; vram_size = (uint64_t)RREG32(mmRCC_CONFIG_MEMSIZE) << 20;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment