drm/amd/ras: sleep on PMFW EEPROM busy in bad page count query
Subsystems (3)
PATCH 1/2 drm/amd/ras: sleep on PMFW EEPROM busy in bad page count query
Use usleep_range() instead of mdelay() when ras_fw_get_badpage_count() retries on -EBUSY so the driver yields the CPU while waiting for PMFW EEPROM to become ready.
--- drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/rascore/ras_eeprom_fw.c +1 -1
@@ -72,7 +72,7 @@ int ras_fw_get_badpage_count(struct ras_core_context *ras_core,if (ret != -EBUSY )return ret; -mdelay (10 ); +usleep_range (10000 ,15000 ); now = (uint64_t )ktime_to_ms (ktime_get ()); }while (now < end);
Signature · 1 line
2.25.1
PATCH 2/2 drm/amd/pm: sleep on PMFW EEPROM busy in bad page count query
Use usleep_range() instead of mdelay() to matche the behavior of ras_fw_get_badpage_count() in rascore path.
--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +1 -1
@@ -1042,7 +1042,7 @@ static int smu_v13_0_12_get_badpage_count(struct amdgpu_device *adev, uint32_t */* eeprom is not ready */ if (ret != -EBUSY )return ret; -mdelay (10 ); +usleep_range (10000 ,15000 ); now = (uint64_t )ktime_to_ms (ktime_get ()); }while (now < end);
Signature · 1 line
2.25.1
RE: [PATCH 2/2] drm/amd/pm: sleep on PMFW EEPROM busy in bad page count query
AMD General
Series is
Best Regards,
Kevin
Quoted 36 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Candice Li
Sent: Wednesday, June 3, 2026 10:06 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Xie, Patrick <[email protected]>; Li, Candice <[email protected]>
Subject: [PATCH 2/2] drm/amd/pm: sleep on PMFW EEPROM busy in bad page count queryUse
usleep_range()instead ofmdelay()to matche the behavior ofras_fw_get_badpage_count()in rascore path.Signed-off-by Candice Li <[email protected]>--- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +0
-0@@ -1042,7 +1042,7 @@ static int smu_v13_0_12_get_badpage_count(struct
amdgpu_device*adev,uint32_t*/* eeprom is not ready */ if (ret != -EBUSY) return ret;drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_12_ppt.c +1
-2-mdelay (10 ); +usleep_range (10000 ,15000 ); now = (uint64_t )ktime_to_ms (ktime_get ()); }while (now < end); --2.25.1