drm/amdgpu: Move CPER init before bad page load
Subsystems (2)
PATCH 1/2 drm/amdgpu: Move CPER init before bad page load
We want to send CPERs if the GPU has met or exceeded the threshold for bad pages, but we need the CPER infrastructure to be enabled first. Initialize it just before we load the bad pages
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +4 -2
@@ -3106,6 +3106,10 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)if (r) goto init_failed; + r =amdgpu_cper_init (adev); +if (r) + goto init_failed; +/* * retired pages will be loaded from eeprom and reserved here, * it should be called after amdgpu_device_ip_hw_init_phase2 since
@@ -3169,8 +3173,6 @@ static int amdgpu_device_ip_init(struct amdgpu_device *adev)amdgpu_fru_get_product_info (adev); - r =amdgpu_cper_init (adev); - init_failed:return r;
Signature · 1 line
2.43.0
PATCH 2/2 drm/amdgpu: Send an in-band CPER if threshold is exceeded on init
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
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +3 -0
@@ -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 ) {
Signature · 1 line
2.43.0
RE: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded on init
[AMD Official Use Only - AMD Internal Distribution Only]
The series is: Reviewed-by: Tao Zhou <[email protected]>
Hi Dean,
Could you take a look into the patches as well? Thanks.
Tao
Quoted 39 lines
-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Saturday, January 31, 2026 5:11 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Russell, Kent <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded on initWhen 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(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +3
-0@@ -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 forexceeding bad
+page threshold");} else if (hdr->header == RAS_TABLE_HDR_BAD && amdgpu_bad_page_threshold != 0) {--
2.43.0
Re: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded on init
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Tao,
This patch series looks good to me.
Best Regards,
Liu, Xiang
________________________________
From: Zhou1, Tao <[email protected]>
Sent: Monday, February 2, 2026 2:24 PM
To: Russell, Kent <[email protected]>; [email protected] <[email protected]>; Liu, Xiang(Dean) <[email protected]>
Cc: Zhang, Hawking <[email protected]>
Subject: RE: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded on init
[AMD Official Use Only - AMD Internal Distribution Only]
The series is: Reviewed-by: Tao Zhou <[email protected]>
Hi Dean,
Could you take a look into the patches as well? Thanks.
Tao
Quoted 39 lines
-----Original Message-----
From: Russell, Kent <[email protected]>
Sent: Saturday, January 31, 2026 5:11 AM
To: [email protected]
Cc: Zhang, Hawking <[email protected]>; Zhou1, Tao <[email protected]>; Russell, Kent <[email protected]>
Subject: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded on initWhen 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(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +3
-0@@ -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 forexceeding bad
+page threshold");} else if (hdr->header == RAS_TABLE_HDR_BAD && amdgpu_bad_page_threshold != 0) {--
2.43.0
RE: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded on init
[Public]
Holding off on this set. Working on the OOB side due to some complications with timing. I'll send a new set once we get that figured out. Thanks for the review!
Kent
From: Liu, Xiang(Dean) <[email protected]>
Sent: Monday, February 2, 2026 7:23 AM
To: Zhou1, Tao <[email protected]>; Russell, Kent <[email protected]>; [email protected]
Cc: Zhang, Hawking <[email protected]>
Subject: Re: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded on init
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Tao,
This patch series looks good to me.
Best Regards,
Liu, Xiang
________________________________
From: Zhou1, Tao <[email protected]<mailto:[email protected]>>
Sent: Monday, February 2, 2026 2:24 PM
To: Russell, Kent <[email protected]<mailto:[email protected]>>; [email protected]<mailto:[email protected]> <[email protected]<mailto:[email protected]>>; Liu, Xiang(Dean) <[email protected]<mailto:[email protected]>>
Cc: Zhang, Hawking <[email protected]<mailto:[email protected]>>
Subject: RE: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded on init
[AMD Official Use Only - AMD Internal Distribution Only]
The series is: Reviewed-by: Tao Zhou <[email protected]<mailto:[email protected]>>
Hi Dean,
Could you take a look into the patches as well? Thanks.
Tao
Quoted 39 lines
-----Original Message-----
From: Russell, Kent <[email protected]<mailto:[email protected]>>
Sent: Saturday, January 31, 2026 5:11 AM
To: [email protected]<mailto:[email protected]>
Cc: Zhang, Hawking <[email protected]<mailto:[email protected]>>; Zhou1, Tao <[email protected]<mailto:[email protected]>>; Russell, Kent <[email protected]<mailto:[email protected]>>
Subject: [PATCH 2/2] drm/amdgpu: Send an in-band CPER if threshold is exceeded
on initWhen 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
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c +3
-0@@ -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 forexceeding bad
+page threshold");} else if (hdr->header == RAS_TABLE_HDR_BAD && amdgpu_bad_page_threshold != 0) {--
2.43.0