Commit b3505c2c authored by Xiang Liu's avatar Xiang Liu Committed by Alex Deucher
Browse files

drm/amdgpu: Generate BP threshold exceed CPER once threshold exceeded



The bad pages threshold exceed CPER should be generated once threshold
exceeded, no matter the bad_page_threshold setted or not.

Signed-off-by: default avatarXiang Liu <xiang.liu@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d9f6a070
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -765,6 +765,10 @@ amdgpu_ras_eeprom_update_header(struct amdgpu_ras_eeprom_control *control)
		dev_warn(adev->dev,
			"Saved bad pages %d reaches threshold value %d\n",
			control->ras_num_bad_pages, ras->bad_page_cnt_threshold);

		if (adev->cper.enabled && amdgpu_cper_generate_bp_threshold_record(adev))
			dev_warn(adev->dev, "fail to generate bad page threshold cper records\n");

		if ((amdgpu_bad_page_threshold != -1) &&
		    (amdgpu_bad_page_threshold != -2)) {
			control->tbl_hdr.header = RAS_TABLE_HDR_BAD;
+0 −4
Original line number Diff line number Diff line
@@ -764,10 +764,6 @@ int amdgpu_dpm_send_rma_reason(struct amdgpu_device *adev)
	ret = smu_send_rma_reason(smu);
	mutex_unlock(&adev->pm.mutex);

	if (adev->cper.enabled)
		if (amdgpu_cper_generate_bp_threshold_record(adev))
			dev_warn(adev->dev, "fail to generate bad page threshold cper records\n");

	return ret;
}