Skip to contentSkip to conversation

drm/amdgpu: Reset OOB table error count info

PATCH In review Stanley.Yang 2 participants 2 messages Feb 11, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Reset OOB table error count info

The OOB table error count info should be reset after reset eeprom table

Change-Id I2a39e0e44b7b1a5ab7d6b4d4b73ebe48264396b7
---
 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
index c09d047272b2..2b844a5aafdb 100644
@@ -263,6 +263,7 @@ static int amdgpu_ras_eeprom_correct_header_tag(
  */
 int amdgpu_ras_eeprom_reset_table(struct amdgpu_ras_eeprom_control *control)
 {
+	struct amdgpu_device *adev = to_amdgpu_device(control);
 	struct amdgpu_ras_eeprom_table_header *hdr = &control->tbl_hdr;
 	u8 csum;
 	int res;
@@ -282,6 +283,8 @@ int amdgpu_ras_eeprom_reset_table(struct amdgpu_ras_eeprom_control *control)
 	control->ras_num_recs = 0;
 	control->ras_fri = 0;
 
+	amdgpu_dpm_send_hbm_bad_pages_num(adev, control->ras_num_recs);
+
 	amdgpu_ras_debugfs_set_ret_size(control);
 
 	mutex_unlock(&control->ras_tbl_mutex);
Signature · 1 line
2.17.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only]

Quoted 43 lines

-----Original Message-----
From: Stanley.Yang <[email protected]>
Sent: Friday, February 11, 2022 3:04 PM
To: [email protected]; Zhang, Hawking <[email protected]>; Clements, John <[email protected]>; Zhou1, Tao <[email protected]>
Cc: Yang, Stanley <[email protected]>
Subject: [PATCH Review 1/1] drm/amdgpu: Reset OOB table error count info

The OOB table error count info should be reset after reset eeprom table

Change-Id I2a39e0e44b7b1a5ab7d6b4d4b73ebe48264396b7
---
 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
index c09d047272b2..2b844a5aafdb 100644
@@ -263,6 +263,7 @@ static int amdgpu_ras_eeprom_correct_header_tag(
  */
 int amdgpu_ras_eeprom_reset_table(struct amdgpu_ras_eeprom_control
 *control)  {
+	struct amdgpu_device *adev = to_amdgpu_device(control);
 	struct amdgpu_ras_eeprom_table_header *hdr = &control->tbl_hdr;
 	u8 csum;
 	int res;
@@ -282,6 +283,8 @@ int amdgpu_ras_eeprom_reset_table(struct
 amdgpu_ras_eeprom_control *control)
 	control->ras_num_recs = 0;
 	control->ras_fri = 0;
 
+	amdgpu_dpm_send_hbm_bad_pages_num(adev, control-
 >ras_num_recs);
+
 	amdgpu_ras_debugfs_set_ret_size(control);

mutex_unlock(&control->ras_tbl_mutex);
--
2.17.1