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.

Signed-off-by: Candice Li <candice.li@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Candice Li 2026-05-29 12:29:52 +08:00 committed by Alex Deucher
parent cd6397b7af
commit 7fa88ae2f4

View File

@ -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);