drm/amd/ras: fix and improve bad page count calculation

Fix an issue where the saved bad page count is always zero.

The cur_nps_valid_page_num field in the record already tracks
the available bad page count, so use it directly to calculate
the correct saved bad page number.

Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
YiPeng Chai 2026-07-22 18:09:46 +08:00 • committed by Alex Deucher
commit 7765daaec5
2 changed files with 16 additions and 22 deletions