]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
amdgpu/amdgpu_discovery: increase timeout limit for IFWI init
authorXaver Hugl <xaver.hugl@kde.org>
Thu, 31 Jul 2025 22:49:51 +0000 (00:49 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 6 Aug 2025 20:51:26 +0000 (16:51 -0400)
With a timeout of only 1 second, my rx 5700XT fails to initialize,
so this increases the timeout to 2s.

Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3697
Signed-off-by: Xaver Hugl <xaver.hugl@kde.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 9ed3d7bdf2dcdf1a1196630fab89a124526e9cc2)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c

index 81b3443c8d7f48392ccf14d4c9cf3961a6fdd239..047a6349644172e5a19d49cfaeda8b9c603d8f4a 100644 (file)
@@ -276,7 +276,7 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
        u32 msg;
 
        if (!amdgpu_sriov_vf(adev)) {
-               /* It can take up to a second for IFWI init to complete on some dGPUs,
+               /* It can take up to two second for IFWI init to complete on some dGPUs,
                 * but generally it should be in the 60-100ms range.  Normally this starts
                 * as soon as the device gets power so by the time the OS loads this has long
                 * completed.  However, when a card is hotplugged via e.g., USB4, we need to
@@ -284,7 +284,7 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
                 * continue.
                 */
 
-               for (i = 0; i < 1000; i++) {
+               for (i = 0; i < 2000; i++) {
                        msg = RREG32(mmMP0_SMN_C2PMSG_33);
                        if (msg & 0x80000000)
                                break;