When we load the bad pages, send an in-band CPER if we have met or
exceeded the bad page threshold. This aligns with a previous patch where
we sent an out-of-band CPER for the same case

Signed-off-by: Kent Russell <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
index 469d04a39d7d..dd7d837b52bf 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c
@@ -1715,6 +1715,9 @@ int amdgpu_ras_eeprom_check(struct 
amdgpu_ras_eeprom_control *control)
                if (amdgpu_bad_page_threshold != 0 &&
                        control->ras_num_bad_pages >= 
ras->bad_page_cnt_threshold)
                        amdgpu_dpm_send_rma_reason(adev);
+               if (adev->cper.enabled && !amdgpu_uniras_enabled(adev) &&
+                   amdgpu_cper_generate_bp_threshold_record(adev))
+                       dev_warn(adev->dev, "Failed to send in-band CPER for 
exceeding bad page threshold");
 
        } else if (hdr->header == RAS_TABLE_HDR_BAD &&
                   amdgpu_bad_page_threshold != 0) {
-- 
2.43.0

Reply via email to