Skip to contentSkip to conversation

drm/amdgpu: fix eGPU hotplug regression

PATCH In review Alex Deucher 2 participants 2 messages Aug 19, 2024

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: fix eGPU hotplug regression

The driver needs to wait for the on board firmware
to finish its initialization before probing the card.
Commit 959056982a9b ("drm/amdgpu: Fix discovery initialization failure during pci rescan") switched from using msleep() to using usleep_range() which
seems to have caused init failures on some navi1x boards. Switch
back to msleep().

Fixes 959056982a9b ("drm/amdgpu: Fix discovery initialization failure during pci rescan")
Cc Ma Jun <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -1
index ac108fca64fe6..7b561e8e3cafc 100644
@@ -278,7 +278,7 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
 			msg = RREG32(mmMP0_SMN_C2PMSG_33);
 			if (msg & 0x80000000)
 				break;
-			usleep_range(1000, 1100);
+			msleep(1);
 		}
 	}
 
Signature · 1 line
2.46.0
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Alex Deucher
Sent: Monday, August 19, 2024 23:24
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Ma Jun <[email protected]>
Subject: [PATCH] drm/amdgpu: fix eGPU hotplug regression

The driver needs to wait for the on board firmware to finish its initialization before probing the card.
Commit 959056982a9b ("drm/amdgpu: Fix discovery initialization failure during pci rescan") switched from using msleep() to using usleep_range() which seems to have caused init failures on some navi1x boards. Switch back to msleep().

Fixes 959056982a9b ("drm/amdgpu: Fix discovery initialization failure during pci rescan")
Cc Ma Jun <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +1 -1
index ac108fca64fe6..7b561e8e3cafc 100644
@@ -278,7 +278,7 @@ static int amdgpu_discovery_read_binary_from_mem(struct amdgpu_device *adev,
                        msg = RREG32(mmMP0_SMN_C2PMSG_33);
                        if (msg & 0x80000000)
                                break;
-                       usleep_range(1000, 1100);
+                       msleep(1);
                }
        }
 

--
2.46.0