Skip to content

Commit 334dc5f

Browse files
Tao Zhoualexdeucher
authored andcommitted
drm/amdgpu: increase RAS bad page threshold
For default policy, driver will issue an RMA event when the number of bad pages is greater than 8 physical rows, rather than reaches 8 physical rows, don't rely on threshold configurable parameters in default mode. Signed-off-by: Tao Zhou <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent fe2fa3b commit 334dc5f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ amdgpu_ras_eeprom_update_header(struct amdgpu_ras_eeprom_control *control)
747747
/* Modify the header if it exceeds.
748748
*/
749749
if (amdgpu_bad_page_threshold != 0 &&
750-
control->ras_num_bad_pages >= ras->bad_page_cnt_threshold) {
750+
control->ras_num_bad_pages > ras->bad_page_cnt_threshold) {
751751
dev_warn(adev->dev,
752752
"Saved bad pages %d reaches threshold value %d\n",
753753
control->ras_num_bad_pages, ras->bad_page_cnt_threshold);
@@ -806,7 +806,7 @@ amdgpu_ras_eeprom_update_header(struct amdgpu_ras_eeprom_control *control)
806806
*/
807807
if (amdgpu_bad_page_threshold != 0 &&
808808
control->tbl_hdr.version == RAS_TABLE_VER_V2_1 &&
809-
control->ras_num_bad_pages < ras->bad_page_cnt_threshold)
809+
control->ras_num_bad_pages <= ras->bad_page_cnt_threshold)
810810
control->tbl_rai.health_percent = ((ras->bad_page_cnt_threshold -
811811
control->ras_num_bad_pages) * 100) /
812812
ras->bad_page_cnt_threshold;
@@ -1456,7 +1456,7 @@ int amdgpu_ras_eeprom_check(struct amdgpu_ras_eeprom_control *control)
14561456
res);
14571457
return -EINVAL;
14581458
}
1459-
if (ras->bad_page_cnt_threshold > control->ras_num_bad_pages) {
1459+
if (ras->bad_page_cnt_threshold >= control->ras_num_bad_pages) {
14601460
/* This means that, the threshold was increased since
14611461
* the last time the system was booted, and now,
14621462
* ras->bad_page_cnt_threshold - control->num_recs > 0,

0 commit comments

Comments
 (0)