drm/amd/pm: sleep on PMFW EEPROM busy in bad page count query

Use usleep_range() instead of mdelay() to match the behavior
of ras_fw_get_badpage_count() in rascore path.

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-06-03 09:53:01 +08:00 committed by Alex Deucher
parent 7fa88ae2f4
commit 09774af2a7

View File

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