Skip to content

Commit f3cbe70

Browse files
Tao Zhoualexdeucher
authored andcommitted
drm/amdgpu: change default behavior of bad_page_threshold parameter
Ignore ras umc bad page threshold by default, GPU initialization won't be stopped in this mode. v2: refine the description of bad_page_threshold. Signed-off-by: Tao Zhou <tao.zhou1@amd.com> Reviewed-by: Stanley.Yang <Stanley.Yang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 4d33e0f commit f3cbe70

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ module_param_named(reset_method, amdgpu_reset_method, int, 0444);
924924
* result in the GPU entering bad status when the number of total
925925
* faulty pages by ECC exceeds the threshold value.
926926
*/
927-
MODULE_PARM_DESC(bad_page_threshold, "Bad page threshold(-1 = auto(default value), 0 = disable bad page retirement, -2 = ignore bad page threshold)");
927+
MODULE_PARM_DESC(bad_page_threshold, "Bad page threshold(-1 = ignore threshold (default value), 0 = disable bad page retirement, -2 = driver sets threshold)");
928928
module_param_named(bad_page_threshold, amdgpu_bad_page_threshold, int, 0444);
929929

930930
MODULE_PARM_DESC(num_kcq, "number of kernel compute queue user want to setup (8 if set to greater than 8 or less than 0, only affect gfx 8+)");

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2196,11 +2196,12 @@ static void amdgpu_ras_validate_threshold(struct amdgpu_device *adev,
21962196
/*
21972197
* Justification of value bad_page_cnt_threshold in ras structure
21982198
*
2199-
* Generally, -1 <= amdgpu_bad_page_threshold <= max record length
2200-
* in eeprom, and introduce two scenarios accordingly.
2199+
* Generally, 0 <= amdgpu_bad_page_threshold <= max record length
2200+
* in eeprom or amdgpu_bad_page_threshold == -2, introduce two
2201+
* scenarios accordingly.
22012202
*
22022203
* Bad page retirement enablement:
2203-
* - If amdgpu_bad_page_threshold = -1,
2204+
* - If amdgpu_bad_page_threshold = -2,
22042205
* bad_page_cnt_threshold = typical value by formula.
22052206
*
22062207
* - When the value from user is 0 < amdgpu_bad_page_threshold <

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,8 @@ int amdgpu_ras_eeprom_init(struct amdgpu_ras_eeprom_control *control,
11911191
} else {
11921192
dev_err(adev->dev, "RAS records:%d exceed threshold:%d",
11931193
control->ras_num_recs, ras->bad_page_cnt_threshold);
1194-
if (amdgpu_bad_page_threshold == -2) {
1195-
dev_warn(adev->dev, "GPU will be initialized due to bad_page_threshold = -2.");
1194+
if (amdgpu_bad_page_threshold == -1) {
1195+
dev_warn(adev->dev, "GPU will be initialized due to bad_page_threshold = -1.");
11961196
res = 0;
11971197
} else {
11981198
*exceed_err_limit = true;

0 commit comments

Comments
 (0)