Skip to contentSkip to conversation

drm/amd/ras: send RMA envent in RAS init stage

PATCH In review Tao Zhou 3 participants 15 messages Jul 15 – Jul 16

Subsystems (2)
lore
Share & tools
lore

Tao Zhou

author
#0 lore raw

PATCH 1/5 drm/amd/ras: send RMA envent in RAS init stage

Not only raise the event in runtime.

---
 drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpu/drm/amd/ras/rascore/ras_eeprom.c +1 -0
index 62d1a319c08c..b9a60ad2890c 100644
@@ -1258,6 +1258,7 @@ int ras_eeprom_check_storage_status(struct ras_core_context *ras_core)
 				bad_page_count,
 				control->record_threshold_count);
 			res = ras_eeprom_correct_header_tag(control, RAS_TABLE_HDR_VAL);
+			ras_core_event_notify(ras_core, RAS_EVENT_ID__DEVICE_RMA, NULL);
 		} else {
 			RAS_DEV_ERR(ras_core->dev, "RAS records:%d exceed threshold:%d",
 				bad_page_count, control->record_threshold_count);
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/5 drm/amd/ras: update flip bit setting for uniras

The flip bit setting is different if umc number is half of original configuration.

---
 .../gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c  |   1 +
 drivers/gpu/drm/amd/ras/rascore/ras.h         |   1 +
 drivers/gpu/drm/amd/ras/rascore/ras_umc.c     |   1 +
 drivers/gpu/drm/amd/ras/rascore/ras_umc.h     |   1 +
 .../gpu/drm/amd/ras/rascore/ras_umc_v12_0.c   | 114 ++++++++++++------
 5 files changed, 84 insertions(+), 34 deletions(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +1 -0
index 60412da69b2b..c55288c2df9a 100644
@@ -284,6 +284,7 @@ static int amdgpu_ras_mgr_init_umc_config(struct amdgpu_device *adev,
 	struct ras_umc_config *umc_cfg = &config->umc_cfg;
 
 	umc_cfg->umc_vram_type = adev->gmc.vram_type;
+	umc_cfg->num_umc = adev->gmc.num_umc;
 
 	return 0;
 }
drivers/gpu/drm/amd/ras/rascore/ras.h +1 -0
index 5869bad978b0..5719bc1b6167 100644
@@ -277,6 +277,7 @@ struct ras_psp_config {
 
 struct ras_umc_config {
 	uint32_t umc_vram_type;
+	uint32_t num_umc;
 };
 
 struct ras_eeprom_config {
drivers/gpu/drm/amd/ras/rascore/ras_umc.c +1 -0
index e366fb97293e..dd7a37163110 100644
@@ -691,6 +691,7 @@ int ras_umc_hw_init(struct ras_core_context *ras_core)
 	ras_umc->umc_err_data.umc_nps_mode = nps;
 
 	ras_umc->umc_vram_type = ras_core->config->umc_cfg.umc_vram_type;
+	ras_umc->num_umc = ras_core->config->umc_cfg.num_umc;
 	if (!ras_umc->umc_vram_type) {
 		RAS_DEV_ERR(ras_core->dev, "Invalid UMC VRAM Type: %u!\n",
 			ras_umc->umc_vram_type);
drivers/gpu/drm/amd/ras/rascore/ras_umc.h +1 -0
index ee7100f25f51..71b6703193f5 100644
@@ -137,6 +137,7 @@ struct ras_umc_err_data {
 struct ras_umc {
 	u32 umc_ip_version;
 	u32 umc_vram_type;
+	u32 num_umc;
 	const struct ras_umc_ip_func *ip_func;
 	struct radix_tree_root root;
 	struct mutex  tree_lock;
drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c +80 -34

131 lines not on this page · raw message

Signature · 1 line
2.34.1
Reviewed-by on v1 2/5
#2 lore raw

RE: [PATCH 2/5] drm/amd/ras: update flip bit setting for uniras

AMD General

The patch is

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 2/5] drm/amd/ras: update flip bit setting for uniras

The flip bit setting is different if umc number is half of original configuration.

---
 .../gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c  |   1 +
 drivers/gpu/drm/amd/ras/rascore/ras.h         |   1 +
 drivers/gpu/drm/amd/ras/rascore/ras_umc.c     |   1 +
 drivers/gpu/drm/amd/ras/rascore/ras_umc.h     |   1 +
 .../gpu/drm/amd/ras/rascore/ras_umc_v12_0.c   | 114 ++++++++++++------
 5 files changed, 84 insertions(+), 34 deletions(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +1 -0
index 60412da69b2b..c55288c2df9a 100644
@@ -284,6 +284,7 @@ static int amdgpu_ras_mgr_init_umc_config(struct amdgpu_device *adev,
        struct ras_umc_config *umc_cfg = &config->umc_cfg;
 
        umc_cfg->umc_vram_type = adev->gmc.vram_type;
+       umc_cfg->num_umc = adev->gmc.num_umc;
 
        return 0;
 }
drivers/gpu/drm/amd/ras/rascore/ras.h +1 -0
index 5869bad978b0..5719bc1b6167 100644
@@ -277,6 +277,7 @@ struct ras_psp_config {
 
 struct ras_umc_config {
        uint32_t umc_vram_type;
+       uint32_t num_umc;
 };
 
 struct ras_eeprom_config {
drivers/gpu/drm/amd/ras/rascore/ras_umc.c +1 -0
index e366fb97293e..dd7a37163110 100644
@@ -691,6 +691,7 @@ int ras_umc_hw_init(struct ras_core_context *ras_core)
        ras_umc->umc_err_data.umc_nps_mode = nps;
 
        ras_umc->umc_vram_type = ras_core->config->umc_cfg.umc_vram_type;
+       ras_umc->num_umc = ras_core->config->umc_cfg.num_umc;
        if (!ras_umc->umc_vram_type) {
                RAS_DEV_ERR(ras_core->dev, "Invalid UMC VRAM Type: %u!\n",
                        ras_umc->umc_vram_type);
drivers/gpu/drm/amd/ras/rascore/ras_umc.h +1 -0
index ee7100f25f51..71b6703193f5 100644
@@ -137,6 +137,7 @@ struct ras_umc_err_data {  struct ras_umc {
        u32 umc_ip_version;
        u32 umc_vram_type;
+       u32 num_umc;
        const struct ras_umc_ip_func *ip_func;
        struct radix_tree_root root;
        struct mutex  tree_lock;
drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c +80 -34

131 lines not on this page · raw message

--
2.34.1

author
#3 lore raw

PATCH 3/5 drm/amd/ras: add support for old ras eeprom format

In reply to Tao Zhou

Handler of some formats will be implemented in the future.

---
 drivers/gpu/drm/amd/ras/rascore/ras_umc.h     | 17 ++++++++++
 .../gpu/drm/amd/ras/rascore/ras_umc_v12_0.c   | 31 ++++++++++++++-----
 2 files changed, 41 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_umc.h +17 -0
index 71b6703193f5..5b9218ebf2ad 100644
@@ -46,6 +46,23 @@
 #define UMC_ECC_NEW_DETECTED_TAG       0x1
 #define UMC_INV_MEM_PFN  (0xFFFFFFFFFFFFFFFF)
 
+/*
+ * a flag to indicate v2 of channel index stored in eeprom
+ *
+ * v1 (legacy way): store channel index within a umc instance in eeprom
+ *    range in UMC v12: 0 ~ 7
+ * v2: store global channel index in eeprom
+ *    range in UMC v12: 0 ~ 127
+ *
+ * NOTE: it's better to store it in eeprom_table_record.mem_channel,
+ * but there is only 8 bits in mem_channel, and the channel number may
+ * increase in the future, we decide to save it in
+ * eeprom_table_record.retired_page. retired_page is useless in v2,
+ * we depend on eeprom_table_record.address instead of retired_page in v2.
+ * Only 48 bits are saved on eeprom, use bit 47 here.
+ */
+#define UMC_CHANNEL_IDX_V2      BIT_ULL(47)
+
 /* three column bits and one row bit in MCA address flip
  * in bad page retirement
  */
drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c +24 -7
index 809cbd846883..b8630aba9e64 100644
@@ -459,16 +459,33 @@ static int convert_eeprom_record_to_nps_addr(struct ras_core_context *ras_core,
 static int umc_v12_0_eeprom_record_to_nps_record(struct ras_core_context *ras_core,
 				struct eeprom_umc_record *record, uint32_t nps)
 {
-	uint64_t pa = 0;
+	uint64_t ch_idx_v2, pa = 0;
+	uint32_t save_nps;
 	int ret = 0;
 
-	if (nps == EEPROM_RECORD_UMC_NPS_MODE(record) && !ras_fw_eeprom_supported(ras_core)) {
-		record->cur_nps_retired_row_pfn = EEPROM_RECORD_UMC_ADDR_PFN(record);
-	} else {
-		ret = convert_eeprom_record_to_nps_addr(ras_core,
+	save_nps = EEPROM_RECORD_UMC_NPS_MODE(record);
+	ch_idx_v2 = record->retired_row_pfn & UMC_CHANNEL_IDX_V2;
+
+	if (save_nps || ch_idx_v2) {
+		if ((nps == save_nps) && !ras_fw_eeprom_supported(ras_core)) {
+			record->cur_nps_retired_row_pfn =
+				EEPROM_RECORD_UMC_ADDR_PFN(record);
+		} else {
+			ret = convert_eeprom_record_to_nps_addr(ras_core,
 				record, &pa, nps);
-		if (!ret)
-			record->cur_nps_retired_row_pfn = RAS_ADDR_TO_PFN(pa);
+			if (!ret)
+				record->cur_nps_retired_row_pfn = RAS_ADDR_TO_PFN(pa);
+		}
+	} else {
+		if (record->address == 0) {
+			/* for specific old eeprom data, mca address is not stored,
+			 * calc it from pa
+			 */
+		} else {
+			/* old eeprom data format, the scope of channel index is
+			 * limited to umc instance
+			 */
+		}
 	}
 
 	record->cur_nps = nps;
Signature · 1 line
2.34.1
Reviewed-by on v1 3/5
#4 lore raw

RE: [PATCH 3/5] drm/amd/ras: add support for old ras eeprom format

AMD General

The patch is

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 3/5] drm/amd/ras: add support for old ras eeprom format

Handler of some formats will be implemented in the future.

---
 drivers/gpu/drm/amd/ras/rascore/ras_umc.h     | 17 ++++++++++
 .../gpu/drm/amd/ras/rascore/ras_umc_v12_0.c   | 31 ++++++++++++++-----
 2 files changed, 41 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_umc.h +17 -0
index 71b6703193f5..5b9218ebf2ad 100644
@@ -46,6 +46,23 @@
 #define UMC_ECC_NEW_DETECTED_TAG       0x1
 #define UMC_INV_MEM_PFN  (0xFFFFFFFFFFFFFFFF)
 
+/*
+ * a flag to indicate v2 of channel index stored in eeprom
+ *
+ * v1 (legacy way): store channel index within a umc instance in eeprom
+ *    range in UMC v12: 0 ~ 7
+ * v2: store global channel index in eeprom
+ *    range in UMC v12: 0 ~ 127
+ *
+ * NOTE: it's better to store it in eeprom_table_record.mem_channel,
+ * but there is only 8 bits in mem_channel, and the channel number may
+ * increase in the future, we decide to save it in
+ * eeprom_table_record.retired_page. retired_page is useless in v2,
+ * we depend on eeprom_table_record.address instead of retired_page in v2.
+ * Only 48 bits are saved on eeprom, use bit 47 here.
+ */
+#define UMC_CHANNEL_IDX_V2      BIT_ULL(47)
+
 /* three column bits and one row bit in MCA address flip
  * in bad page retirement
  */
drivers/gpu/drm/amd/ras/rascore/ras_umc_v12_0.c +24 -8
index 809cbd846883..b8630aba9e64 100644
@@ -459,16 +459,33 @@ static int convert_eeprom_record_to_nps_addr(struct ras_core_context *ras_core,  static int umc_v12_0_eeprom_record_to_nps_record(struct ras_core_context *ras_core,
                                struct eeprom_umc_record *record, uint32_t nps)  {
-       uint64_t pa = 0;
+       uint64_t ch_idx_v2, pa = 0;
+       uint32_t save_nps;
        int ret = 0;
 
-       if (nps == EEPROM_RECORD_UMC_NPS_MODE(record) && !ras_fw_eeprom_supported(ras_core)) {
-               record->cur_nps_retired_row_pfn = EEPROM_RECORD_UMC_ADDR_PFN(record);
-       } else {
-               ret = convert_eeprom_record_to_nps_addr(ras_core,
+       save_nps = EEPROM_RECORD_UMC_NPS_MODE(record);
+       ch_idx_v2 = record->retired_row_pfn & UMC_CHANNEL_IDX_V2;
+
+       if (save_nps || ch_idx_v2) {
+               if ((nps == save_nps) && !ras_fw_eeprom_supported(ras_core)) {
+                       record->cur_nps_retired_row_pfn =
+                               EEPROM_RECORD_UMC_ADDR_PFN(record);
+               } else {
+                       ret = convert_eeprom_record_to_nps_addr(ras_core,
                                record, &pa, nps);
-               if (!ret)
-                       record->cur_nps_retired_row_pfn = RAS_ADDR_TO_PFN(pa);
+                       if (!ret)
+                               record->cur_nps_retired_row_pfn = RAS_ADDR_TO_PFN(pa);
+               }
+       } else {
+               if (record->address == 0) {
+                       /* for specific old eeprom data, mca address is not stored,
+                        * calc it from pa
+                        */
+               } else {
+                       /* old eeprom data format, the scope of channel index is
+                        * limited to umc instance
+                        */
+               }
        }
 
        record->cur_nps = nps;
--

2.34.1

author
#5 lore raw

PATCH 4/5 drm/amd/ras: add real ras deferred error count

In reply to Tao Zhou

It only depends on the status of ras bank register, and can be used in common aca layer.

---
 drivers/gpu/drm/amd/ras/rascore/ras_aca.h      |  2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c | 18 +++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_aca.h +2 -0
index f61b02a5f0fc..0bde803f7472 100644
@@ -83,6 +83,8 @@ struct aca_bank_ecc {
 	u32 ce_count;
 	u32 ue_count;
 	u32 de_count;
+	/* only depends on bank reg status */
+	u32 real_de_count;
 };
 
 struct aca_ecc_count {
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +11 -7
index 840610538c1f..41df331587a0 100644
@@ -207,6 +207,13 @@ static bool aca_check_umc_ce(struct ras_core_context *ras_core, uint64_t mc_umc_
 		     !(aca_check_umc_ue(ras_core, mc_umc_status)))));
 }
 
+static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
+				uint64_t status)
+{
+	return (ACA_REG_STATUS_POISON(status) ||
+				ACA_REG_STATUS_DEFERRED(status));
+}
+
 static int aca_parse_umc_bank(struct ras_core_context *ras_core,
 			struct aca_block *ras_blk, void *data, void *buf)
 {
@@ -230,6 +237,9 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core,
 	ext_error_code = ACA_REG_STATUS_ERRORCODEEXT(status0);
 	misc0_errcnt = ACA_REG_MISC0_ERRCNT(bank->regs[ACA_REG_IDX__MISC0]);
 
+	if (aca_check_bank_is_de(ras_core, status0))
+		ecc->real_de_count = misc0_errcnt ? misc0_errcnt : 1;
+
 	if (aca_check_umc_de(ras_core, status0))
 		ecc->de_count = misc0_errcnt ? misc0_errcnt : 1;
 	else if (aca_check_umc_ue(ras_core, status0))
@@ -240,13 +250,6 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core,
 	return 0;
 }
 
-static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
-				uint64_t status)
-{
-	return (ACA_REG_STATUS_POISON(status) ||
-				ACA_REG_STATUS_DEFERRED(status));
-}
-
 static int aca_parse_bank_default(struct ras_core_context *ras_core,
 				  struct aca_block *ras_blk,
 				  void *data, void *buf)
@@ -266,6 +269,7 @@ static int aca_parse_bank_default(struct ras_core_context *ras_core,
 
 	if (aca_check_bank_is_de(ras_core, status)) {
 		ecc->de_count = 0;
+		ecc->real_de_count = 1;
 	} else {
 		if (bank->ecc_type == RAS_ERR_TYPE__UE)
 			ecc->ue_count = 1;
Signature · 1 line
2.34.1
#6 lore raw

RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Can we just use ACA_REG__MISC0__ERRCNT instead? Was trying to understand the use of real_de_count

Regards,
Hawking

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

It only depends on the status of ras bank register, and can be used in common aca layer.

---
 drivers/gpu/drm/amd/ras/rascore/ras_aca.h      |  2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c | 18 +++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_aca.h +2 -0
index f61b02a5f0fc..0bde803f7472 100644
@@ -83,6 +83,8 @@ struct aca_bank_ecc {
        u32 ce_count;
        u32 ue_count;
        u32 de_count;
+       /* only depends on bank reg status */
+       u32 real_de_count;
 };
 
 struct aca_ecc_count {
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +7 -0
index 840610538c1f..41df331587a0 100644
@@ -207,6 +207,13 @@ static bool aca_check_umc_ce(struct ras_core_context *ras_core, uint64_t mc_umc_
                     !(aca_check_umc_ue(ras_core, mc_umc_status)))));  }
 
+static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
+                               uint64_t status)
+{
+       return (ACA_REG_STATUS_POISON(status) ||
+                               ACA_REG_STATUS_DEFERRED(status));
+}
+
 static int aca_parse_umc_bank(struct ras_core_context *ras_core,
                        struct aca_block *ras_blk, void *data, void *buf)  { @@ -230,6 +237,9 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core,
        ext_error_code = ACA_REG_STATUS_ERRORCODEEXT(status0);
        misc0_errcnt = ACA_REG_MISC0_ERRCNT(bank->regs[ACA_REG_IDX__MISC0]);

+ if (aca_check_bank_is_de(ras_core, status0))
+ ecc->real_de_count = misc0_errcnt ? misc0_errcnt : 1;
+

        if (aca_check_umc_de(ras_core, status0))
                ecc->de_count = misc0_errcnt ? misc0_errcnt : 1;
        else if (aca_check_umc_ue(ras_core, status0)) @@ -240,13 +250,6 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core,
        return 0;

}

-static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
- uint64_t status)
-{
- return (ACA_REG_STATUS_POISON(status) ||
- ACA_REG_STATUS_DEFERRED(status));
-}
-
static int aca_parse_bank_default(struct ras_core_context *ras_core,
struct aca_block *ras_blk,
void *data, void *buf)
@@ -266,6 +269,7 @@ static int aca_parse_bank_default(struct ras_core_context *ras_core,

        if (aca_check_bank_is_de(ras_core, status)) {
                ecc->de_count = 0;
+               ecc->real_de_count = 1;
        } else {
                if (bank->ecc_type == RAS_ERR_TYPE__UE)
                        ecc->ue_count = 1;

--
2.34.1

author
#7 lore raw

RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Quoted 7 lines

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Wednesday, July 15, 2026 5:29 PM
To: Zhou1, Tao <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

Quoted 7 lines

AMD General

Can we just use ACA_REG__MISC0__ERRCNT instead? Was trying to understand the use of real_de_count

Regards,
Hawking

[Tao] as you can see in aca_parse_bank_default:

         if (aca_check_bank_is_de(ras_core, status)) {
                 ecc->de_count = 0;

...

for non-umc blocks, the ecc->de_count is 0 even aca_check_bank_is_de is true, so I introduce real_de_count to represent the status of aca_check_bank_is_de.

BRs,
Tao

Quoted 83 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

It only depends on the status of ras bank register, and can be used in common aca layer.

---
 drivers/gpu/drm/amd/ras/rascore/ras_aca.h      |  2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c | 18 +++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_aca.h +2 -0
index f61b02a5f0fc..0bde803f7472 100644
@@ -83,6 +83,8 @@ struct aca_bank_ecc {
        u32 ce_count;
        u32 ue_count;
        u32 de_count;
+       /* only depends on bank reg status */
+       u32 real_de_count;
 };
 
 struct aca_ecc_count {
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +5 -0
index 840610538c1f..41df331587a0 100644
@@ -207,6 +207,13 @@ static bool aca_check_umc_ce(struct ras_core_context
 *ras_core, uint64_t mc_umc_
                     !(aca_check_umc_ue(ras_core, mc_umc_status)))));  }
 
+static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
+                               uint64_t status) {
+       return (ACA_REG_STATUS_POISON(status) ||
+                               ACA_REG_STATUS_DEFERRED(status)); }
+
 static int aca_parse_umc_bank(struct ras_core_context *ras_core,
                        struct aca_block *ras_blk, void *data, void *buf)  { @@ -230,6 +237,9
 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core,
        ext_error_code = ACA_REG_STATUS_ERRORCODEEXT(status0);
        misc0_errcnt = ACA_REG_MISC0_ERRCNT(bank-
Quoted 1 line

regs[ACA_REG_IDX__MISC0]);

drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +3 -0
+       if (aca_check_bank_is_de(ras_core, status0))
+               ecc->real_de_count = misc0_errcnt ? misc0_errcnt : 1;
+
        if (aca_check_umc_de(ras_core, status0))
                ecc->de_count = misc0_errcnt ? misc0_errcnt : 1;
        else if (aca_check_umc_ue(ras_core, status0)) @@ -240,13 +250,6 @@ static

int aca_parse_umc_bank(struct ras_core_context *ras_core,

        return 0;

}

drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +0 -7
-static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
-                               uint64_t status)
-{
-       return (ACA_REG_STATUS_POISON(status) ||
-                               ACA_REG_STATUS_DEFERRED(status));
-}
-
 static int aca_parse_bank_default(struct ras_core_context *ras_core,
                                  struct aca_block *ras_blk,
                                  void *data, void *buf) @@ -266,6 +269,7 @@ static int

aca_parse_bank_default(struct ras_core_context *ras_core,

        if (aca_check_bank_is_de(ras_core, status)) {
                ecc->de_count = 0;
+               ecc->real_de_count = 1;
        } else {
                if (bank->ecc_type == RAS_ERR_TYPE__UE)
                        ecc->ue_count = 1;

--
2.34.1

#8 lore raw

RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Best Regards,
Thomas
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Zhou1, Tao
Sent: Wednesday, July 15, 2026 5:35 PM
To: Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Quoted 16 lines

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Wednesday, July 15, 2026 5:29 PM
To: Zhou1, Tao <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Can we just use ACA_REG__MISC0__ERRCNT instead? Was trying to understand the use of real_de_count

Regards,
Hawking

Quoted 7 lines

[Tao] as you can see in aca_parse_bank_default:

        if (aca_check_bank_is_de(ras_core, status)) {
               ecc->de_count = 0;

...

for non-umc blocks, the ecc->de_count is 0 even aca_check_bank_is_de is true, so I introduce real_de_count to represent the status of aca_check_bank_is_de.

[Thomas] Can we add disable ce log check to here? If ce log is disabled then set ecc->de_count = 1, so that not need to introduce a new variable?

BRs,
Tao

Quoted 87 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

It only depends on the status of ras bank register, and can be used in common aca layer.

---
 drivers/gpu/drm/amd/ras/rascore/ras_aca.h      |  2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c | 18
+++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_aca.h +2 -0
index f61b02a5f0fc..0bde803f7472 100644
@@ -83,6 +83,8 @@ struct aca_bank_ecc {
        u32 ce_count;
        u32 ue_count;
        u32 de_count;
+       /* only depends on bank reg status */
+       u32 real_de_count;
 };
 
 struct aca_ecc_count {
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +0 -0
index 840610538c1f..41df331587a0 100644
@@ -207,6 +207,13 @@ static bool aca_check_umc_ce(struct

ras_core_context *ras_core, uint64_t mc_umc_

                     !(aca_check_umc_ue(ras_core, mc_umc_status)))));
}
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +5 -0
+static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
+                               uint64_t status) {
+       return (ACA_REG_STATUS_POISON(status) ||
+                               ACA_REG_STATUS_DEFERRED(status)); }
+
 static int aca_parse_umc_bank(struct ras_core_context *ras_core,
                        struct aca_block *ras_blk, void *data, void

*buf) { @@ -230,6 +237,9 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core,
ext_error_code = ACA_REG_STATUS_ERRORCODEEXT(status0);
misc0_errcnt = ACA_REG_MISC0_ERRCNT(bank-

Quoted 1 line

regs[ACA_REG_IDX__MISC0]);

drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +5 -7
+       if (aca_check_bank_is_de(ras_core, status0))
+               ecc->real_de_count = misc0_errcnt ? misc0_errcnt : 1;
+
        if (aca_check_umc_de(ras_core, status0))
                ecc->de_count = misc0_errcnt ? misc0_errcnt : 1;
        else if (aca_check_umc_ue(ras_core, status0)) @@ -240,13
+250,6 @@ static int aca_parse_umc_bank(struct ras_core_context *ras_core,
        return 0;
 }
 
-static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
-                               uint64_t status)
-{
-       return (ACA_REG_STATUS_POISON(status) ||
-                               ACA_REG_STATUS_DEFERRED(status));
-}
-
 static int aca_parse_bank_default(struct ras_core_context *ras_core,
                                  struct aca_block *ras_blk,
                                  void *data, void *buf) @@ -266,6
+269,7 @@ static int aca_parse_bank_default(struct ras_core_context

*ras_core,

        if (aca_check_bank_is_de(ras_core, status)) {
                ecc->de_count = 0;
+               ecc->real_de_count = 1;
        } else {
                if (bank->ecc_type == RAS_ERR_TYPE__UE)
                        ecc->ue_count = 1;

--
2.34.1

author
#9 lore raw

RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Quoted 41 lines

-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Thursday, July 16, 2026 9:41 AM
To: Zhou1, Tao <[email protected]>; Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Best Regards,
Thomas
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Zhou1, Tao
Sent: Wednesday, July 15, 2026 5:35 PM
To: Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Quoted 21 lines

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Wednesday, July 15, 2026 5:29 PM
To: Zhou1, Tao <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: RE: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

AMD General

Can we just use ACA_REG__MISC0__ERRCNT instead? Was trying to understand the use of real_de_count

Regards,
Hawking

[Tao] as you can see in aca_parse_bank_default:

        if (aca_check_bank_is_de(ras_core, status)) {
               ecc->de_count = 0;

...

Quoted 5 lines
Quoted 1 line

for non-umc blocks, the ecc->de_count is 0 even aca_check_bank_is_de is true, so

I introduce real_de_count to represent the status of aca_check_bank_is_de.

[Thomas] Can we add disable ce log check to here? If ce log is disabled then set ecc->de_count = 1, so that not need to introduce a new variable?

[Tao] we can drop this patch if de_count is only valid for umc block.

Quoted 94 lines

BRs,
Tao

Quoted 50 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 4/5] drm/amd/ras: add real ras deferred error count

It only depends on the status of ras bank register, and can be used in common aca layer.

---
 drivers/gpu/drm/amd/ras/rascore/ras_aca.h      |  2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c | 18
+++++++++++-------
 2 files changed, 13 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/ras/rascore/ras_aca.h +2 -0
index f61b02a5f0fc..0bde803f7472 100644
@@ -83,6 +83,8 @@ struct aca_bank_ecc {
        u32 ce_count;
        u32 ue_count;
        u32 de_count;
+       /* only depends on bank reg status */
+       u32 real_de_count;
 };
 
 struct aca_ecc_count {
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +0 -0
index 840610538c1f..41df331587a0 100644
@@ -207,6 +207,13 @@ static bool aca_check_umc_ce(struct

ras_core_context *ras_core, uint64_t mc_umc_

                     !(aca_check_umc_ue(ras_core, mc_umc_status)))));
}
drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +5 -0
+static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
+                               uint64_t status) {
+       return (ACA_REG_STATUS_POISON(status) ||
+                               ACA_REG_STATUS_DEFERRED(status)); }
+
 static int aca_parse_umc_bank(struct ras_core_context *ras_core,
                        struct aca_block *ras_blk, void *data, void
Quoted 1 line

*buf) { @@ -230,6 +237,9 @@ static int aca_parse_umc_bank(struct

ras_core_context *ras_core,

Quoted 37 lines

ext_error_code = ACA_REG_STATUS_ERRORCODEEXT(status0); misc0_errcnt = ACA_REG_MISC0_ERRCNT(bank-

Quoted 1 line

regs[ACA_REG_IDX__MISC0]);

drivers/gpu/drm/amd/ras/rascore/ras_aca_v1_0.c +6 -7
+       if (aca_check_bank_is_de(ras_core, status0))
+               ecc->real_de_count = misc0_errcnt ? misc0_errcnt : 1;
+
        if (aca_check_umc_de(ras_core, status0))
                ecc->de_count = misc0_errcnt ? misc0_errcnt : 1;
        else if (aca_check_umc_ue(ras_core, status0)) @@ -240,13
+250,6 @@ static int aca_parse_umc_bank(struct ras_core_context
+*ras_core,
        return 0;
 }
 
-static bool aca_check_bank_is_de(struct ras_core_context *ras_core,
-                               uint64_t status)
-{
-       return (ACA_REG_STATUS_POISON(status) ||
-                               ACA_REG_STATUS_DEFERRED(status));
-}
-
 static int aca_parse_bank_default(struct ras_core_context *ras_core,
                                  struct aca_block *ras_blk,
                                  void *data, void *buf) @@ -266,6
+269,7 @@ static int aca_parse_bank_default(struct ras_core_context

*ras_core,

        if (aca_check_bank_is_de(ras_core, status)) {
                ecc->de_count = 0;
+               ecc->real_de_count = 1;
        } else {
                if (bank->ecc_type == RAS_ERR_TYPE__UE)
                        ecc->ue_count = 1;

--
2.34.1

author
#10 lore raw

PATCH 5/5 drm/amd/ras: add ras ce log switch for uniras

In reply to Tao Zhou

So we can disable ce log manually.

---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 1 +
 drivers/gpu/drm/amd/ras/rascore/ras.h            | 2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca.c        | 7 ++++++-
 drivers/gpu/drm/amd/ras/rascore/ras_core.c       | 1 +
 4 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +1 -0
index c55288c2df9a..1e95419989b4 100644
@@ -310,6 +310,7 @@ static struct ras_core_context *amdgpu_ras_mgr_create_ras_core(struct amdgpu_dev
 		amdgpu_ras_mgr_eeprom_is_supported(adev);
 	init_config.poison_supported =
 		amdgpu_ras_is_poison_mode_supported(adev);
+	init_config.debug_disable_ce_logs = adev->debug_disable_ce_logs;
 
 	amdgpu_ras_mgr_init_aca_config(adev, &init_config);
 	amdgpu_ras_mgr_init_eeprom_config(adev, &init_config);
drivers/gpu/drm/amd/ras/rascore/ras.h +2 -0
index 5719bc1b6167..9d538a07c50e 100644
@@ -301,6 +301,7 @@ struct ras_core_config {
 
 	bool poison_supported;
 	bool ras_eeprom_supported;
+	bool debug_disable_ce_logs;
 	const struct ras_sys_func *sys_fn;
 
 	struct ras_aca_config aca_cfg;
@@ -348,6 +349,7 @@ struct ras_core_context {
 	bool ras_core_enabled;
 
 	u64 ras_fw_features;
+	bool debug_disable_ce_logs;
 };
 
 struct ras_core_context *ras_core_create(struct ras_core_config *init_config);
drivers/gpu/drm/amd/ras/rascore/ras_aca.c +6 -1
index 67a35409ff0e..9760894c4c66 100644
@@ -98,7 +98,7 @@ static void aca_report_ecc_info(struct ras_core_context *ras_core,
 			blk_name(blk));
 	}
 
-	if (ecc_count.new_ce_count) {
+	if (ecc_count.new_ce_count && !ras_core->debug_disable_ce_logs) {
 		RAS_DEV_INFO(ras_core->dev,
 		"{%llu} socket: %d, die: %d, %u new correctable hardware errors detected in %s block\n",
 			seq_no, skt, aid, ecc_count.new_ce_count, blk_name(blk));
@@ -114,6 +114,11 @@ static void aca_bank_log(struct ras_core_context *ras_core,
 {
 	int i;
 
+	if (ras_core->debug_disable_ce_logs &&
+	    bank->ecc_type == RAS_ERR_TYPE__CE &&
+	    !bank_ecc->real_de_count)
+		return;
+
 	RAS_DEV_INFO(ras_core->dev,
 		"{%llu}" RAS_HW_ERR "Accelerator Check Architecture events logged\n",
 		bank->seq_no);
drivers/gpu/drm/amd/ras/rascore/ras_core.c +1 -0
index 2346918c7736..cdef7727decb 100644
@@ -377,6 +377,7 @@ int ras_core_hw_init(struct ras_core_context *ras_core)
 			ras_core->config->ras_eeprom_supported;
 
 	ras_core->poison_supported = ras_core->config->poison_supported;
+	ras_core->debug_disable_ce_logs = ras_core->config->debug_disable_ce_logs;
 
 	ret = ras_psp_hw_init(ras_core);
 	if (ret)
Signature · 1 line
2.34.1
#11 lore raw

RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

+ init_config.debug_disable_ce_logs = adev->debug_disable_ce_logs;

Let's pass the full amdgpu_debug_mask to ras core

Regards,
Hawking

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

So we can disable ce log manually.

---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 1 +
 drivers/gpu/drm/amd/ras/rascore/ras.h            | 2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca.c        | 7 ++++++-
 drivers/gpu/drm/amd/ras/rascore/ras_core.c       | 1 +
 4 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +1 -0
index c55288c2df9a..1e95419989b4 100644
@@ -310,6 +310,7 @@ static struct ras_core_context *amdgpu_ras_mgr_create_ras_core(struct amdgpu_dev
                amdgpu_ras_mgr_eeprom_is_supported(adev);
        init_config.poison_supported =
                amdgpu_ras_is_poison_mode_supported(adev);
+       init_config.debug_disable_ce_logs = adev->debug_disable_ce_logs;
 
        amdgpu_ras_mgr_init_aca_config(adev, &init_config);
        amdgpu_ras_mgr_init_eeprom_config(adev, &init_config); diff --git a/drivers/gpu/drm/amd/ras/rascore/ras.h b/drivers/gpu/drm/amd/ras/rascore/ras.h

index 5719bc1b6167..9d538a07c50e 100644

drivers/gpu/drm/amd/ras/rascore/ras.h +2 -0
@@ -301,6 +301,7 @@ struct ras_core_config {
 
        bool poison_supported;
        bool ras_eeprom_supported;
+       bool debug_disable_ce_logs;
        const struct ras_sys_func *sys_fn;
 
        struct ras_aca_config aca_cfg;
@@ -348,6 +349,7 @@ struct ras_core_context {
        bool ras_core_enabled;
 
        u64 ras_fw_features;
+       bool debug_disable_ce_logs;
 };
 
 struct ras_core_context *ras_core_create(struct ras_core_config *init_config); diff --git a/drivers/gpu/drm/amd/ras/rascore/ras_aca.c b/drivers/gpu/drm/amd/ras/rascore/ras_aca.c

index 67a35409ff0e..9760894c4c66 100644

drivers/gpu/drm/amd/ras/rascore/ras_aca.c +1 -1
@@ -98,7 +98,7 @@ static void aca_report_ecc_info(struct ras_core_context *ras_core,
                        blk_name(blk));
        }
 
-       if (ecc_count.new_ce_count) {
+       if (ecc_count.new_ce_count && !ras_core->debug_disable_ce_logs) {
                RAS_DEV_INFO(ras_core->dev,
                "{%llu} socket: %d, die: %d, %u new correctable hardware errors detected in %s block\n",
                        seq_no, skt, aid, ecc_count.new_ce_count, blk_name(blk)); @@ -114,6 +114,11 @@ static void aca_bank_log(struct ras_core_context *ras_core,  {
        int i;

+ if (ras_core->debug_disable_ce_logs &&
+ bank->ecc_type == RAS_ERR_TYPE__CE &&
+ !bank_ecc->real_de_count)
+ return;
+

        RAS_DEV_INFO(ras_core->dev,
                "{%llu}" RAS_HW_ERR "Accelerator Check Architecture events logged\n",
                bank->seq_no);
drivers/gpu/drm/amd/ras/rascore/ras_core.c +2 -0
index 2346918c7736..cdef7727decb 100644
@@ -377,6 +377,7 @@ int ras_core_hw_init(struct ras_core_context *ras_core)
                        ras_core->config->ras_eeprom_supported;
 
        ras_core->poison_supported = ras_core->config->poison_supported;
+       ras_core->debug_disable_ce_logs =
+ras_core->config->debug_disable_ce_logs;
 
        ret = ras_psp_hw_init(ras_core);

if (ret)
--
2.34.1

author
#12 lore raw

RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

OK. Since Ce is working on it as well, he will refine his code per my patch and your suggestion.

Regards,
Tao

Quoted 112 lines

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Wednesday, July 15, 2026 4:27 PM
To: Zhou1, Tao <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

+ init_config.debug_disable_ce_logs = adev->debug_disable_ce_logs;

Let's pass the full amdgpu_debug_mask to ras core

Regards,
Hawking

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

So we can disable ce log manually.

---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 1 +
 drivers/gpu/drm/amd/ras/rascore/ras.h            | 2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca.c        | 7 ++++++-
 drivers/gpu/drm/amd/ras/rascore/ras_core.c       | 1 +
 4 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +1 -0
index c55288c2df9a..1e95419989b4 100644
@@ -310,6 +310,7 @@ static struct ras_core_context
 *amdgpu_ras_mgr_create_ras_core(struct amdgpu_dev
                amdgpu_ras_mgr_eeprom_is_supported(adev);
        init_config.poison_supported =
                amdgpu_ras_is_poison_mode_supported(adev);
+       init_config.debug_disable_ce_logs = adev->debug_disable_ce_logs;
 
        amdgpu_ras_mgr_init_aca_config(adev, &init_config);
        amdgpu_ras_mgr_init_eeprom_config(adev, &init_config); diff --git

a/drivers/gpu/drm/amd/ras/rascore/ras.h b/drivers/gpu/drm/amd/ras/rascore/ras.h index 5719bc1b6167..9d538a07c50e 100644

drivers/gpu/drm/amd/ras/rascore/ras.h +2 -0
@@ -301,6 +301,7 @@ struct ras_core_config {
 
        bool poison_supported;
        bool ras_eeprom_supported;
+       bool debug_disable_ce_logs;
        const struct ras_sys_func *sys_fn;
 
        struct ras_aca_config aca_cfg;
@@ -348,6 +349,7 @@ struct ras_core_context {
        bool ras_core_enabled;
 
        u64 ras_fw_features;
+       bool debug_disable_ce_logs;
 };
 
 struct ras_core_context *ras_core_create(struct ras_core_config *init_config); diff --

git a/drivers/gpu/drm/amd/ras/rascore/ras_aca.c
b/drivers/gpu/drm/amd/ras/rascore/ras_aca.c
index 67a35409ff0e..9760894c4c66 100644

drivers/gpu/drm/amd/ras/rascore/ras_aca.c +2 -1
@@ -98,7 +98,7 @@ static void aca_report_ecc_info(struct ras_core_context
 *ras_core,
                        blk_name(blk));
        }
 
-       if (ecc_count.new_ce_count) {
+       if (ecc_count.new_ce_count && !ras_core->debug_disable_ce_logs)
+ {
                RAS_DEV_INFO(ras_core->dev,
                "{%llu} socket: %d, die: %d, %u new correctable hardware errors detected

in %s block\n",

                        seq_no, skt, aid, ecc_count.new_ce_count, blk_name(blk)); @@ -
114,6 +114,11 @@ static void aca_bank_log(struct ras_core_context *ras_core,  {
        int i;
drivers/gpu/drm/amd/ras/rascore/ras_aca.c +5 -0
+       if (ras_core->debug_disable_ce_logs &&
+           bank->ecc_type == RAS_ERR_TYPE__CE &&
+           !bank_ecc->real_de_count)
+               return;
+
        RAS_DEV_INFO(ras_core->dev,
                "{%llu}" RAS_HW_ERR "Accelerator Check Architecture events logged\n",
                bank->seq_no);
drivers/gpu/drm/amd/ras/rascore/ras_core.c +2 -1
index 2346918c7736..cdef7727decb 100644
@@ -377,6 +377,7 @@ int ras_core_hw_init(struct ras_core_context *ras_core)
                        ras_core->config->ras_eeprom_supported;
 
        ras_core->poison_supported = ras_core->config->poison_supported;
+       ras_core->debug_disable_ce_logs =
+ras_core->config->debug_disable_ce_logs;
 
        ret = ras_psp_hw_init(ras_core);
        if (ret)
--

2.34.1

#13 lore raw

RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

Best Regards,
Thomas
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Zhou1, Tao
Sent: Wednesday, July 15, 2026 4:57 PM
To: Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

OK. Since Ce is working on it as well, he will refine his code per my patch and your suggestion.

Regards,
Tao

Quoted 77 lines

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Wednesday, July 15, 2026 4:27 PM
To: Zhou1, Tao <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

+ init_config.debug_disable_ce_logs =
+ adev->debug_disable_ce_logs;

Let's pass the full amdgpu_debug_mask to ras core

Regards,
Hawking

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

So we can disable ce log manually.

---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 1 +
 drivers/gpu/drm/amd/ras/rascore/ras.h            | 2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca.c        | 7 ++++++-
 drivers/gpu/drm/amd/ras/rascore/ras_core.c       | 1 +
 4 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +2 -1
index c55288c2df9a..1e95419989b4 100644
@@ -310,6 +310,7 @@ static struct ras_core_context
 *amdgpu_ras_mgr_create_ras_core(struct amdgpu_dev
                amdgpu_ras_mgr_eeprom_is_supported(adev);
        init_config.poison_supported =
                amdgpu_ras_is_poison_mode_supported(adev);
+       init_config.debug_disable_ce_logs =
+ adev->debug_disable_ce_logs;
 
        amdgpu_ras_mgr_init_aca_config(adev, &init_config);
        amdgpu_ras_mgr_init_eeprom_config(adev, &init_config); diff
--git a/drivers/gpu/drm/amd/ras/rascore/ras.h

b/drivers/gpu/drm/amd/ras/rascore/ras.h
index 5719bc1b6167..9d538a07c50e 100644

drivers/gpu/drm/amd/ras/rascore/ras.h +1 -0
@@ -301,6 +301,7 @@ struct ras_core_config {
 
        bool poison_supported;
        bool ras_eeprom_supported;
+       bool debug_disable_ce_logs;
        const struct ras_sys_func *sys_fn;
 
        struct ras_aca_config aca_cfg; @@ -348,6 +349,7 @@ struct
ras_core_context {
        bool ras_core_enabled;

        u64 ras_fw_features;

+ bool debug_disable_ce_logs;
};

struct ras_core_context *ras_core_create(struct ras_core_config
*init_config); diff -- git a/drivers/gpu/drm/amd/ras/rascore/ras_aca.c b/drivers/gpu/drm/amd/ras/rascore/ras_aca.c
index 67a35409ff0e..9760894c4c66 100644

drivers/gpu/drm/amd/ras/rascore/ras_aca.c static void aca_report_ecc_info(struct · line 103

Quoted 7 lines
drivers/gpu/drm/amd/ras/rascore/ras_aca.c +2 -1
@@ -98,7 +98,7 @@ static void aca_report_ecc_info(struct
 ras_core_context *ras_core,
                        blk_name(blk));
        }
 
-       if (ecc_count.new_ce_count) {
+       if (ecc_count.new_ce_count &&
+ !ras_core->debug_disable_ce_logs) {

[Thomas] Can we replace ras_core->debug_disable_ce_logs with the function interface in sun,ce patch? The other changes are the same.

Quoted 34 lines
drivers/gpu/drm/amd/ras/rascore/ras_aca.c +0 -0
                RAS_DEV_INFO(ras_core->dev,
                "{%llu} socket: %d, die: %d, %u new correctable

hardware errors detected in %s block\n",
seq_no, skt, aid, ecc_count.new_ce_count,
blk_name(blk)); @@ -

114,6 +114,11 @@ static void aca_bank_log(struct ras_core_context *ras_core,  {
        int i;
drivers/gpu/drm/amd/ras/rascore/ras_aca.c +5 -0
+       if (ras_core->debug_disable_ce_logs &&
+           bank->ecc_type == RAS_ERR_TYPE__CE &&
+           !bank_ecc->real_de_count)
+               return;
+
        RAS_DEV_INFO(ras_core->dev,
                "{%llu}" RAS_HW_ERR "Accelerator Check Architecture events logged\n",
                bank->seq_no);
drivers/gpu/drm/amd/ras/rascore/ras_core.c +2 -1
index 2346918c7736..cdef7727decb 100644
@@ -377,6 +377,7 @@ int ras_core_hw_init(struct ras_core_context *ras_core)
                        ras_core->config->ras_eeprom_supported;
 
        ras_core->poison_supported =
 ras_core->config->poison_supported;
+       ras_core->debug_disable_ce_logs =
+ras_core->config->debug_disable_ce_logs;
 
        ret = ras_psp_hw_init(ras_core);
        if (ret)
--

2.34.1

author
#14 lore raw

RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

Quoted 106 lines

-----Original Message-----
From: Chai, Thomas <[email protected]>
Sent: Thursday, July 16, 2026 9:50 AM
To: Zhou1, Tao <[email protected]>; Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

Best Regards,
Thomas
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Zhou1, Tao
Sent: Wednesday, July 15, 2026 4:57 PM
To: Zhang, Hawking <[email protected]>; [email protected]
Subject: RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

OK. Since Ce is working on it as well, he will refine his code per my patch and your suggestion.

Regards,
Tao

Quoted 81 lines

-----Original Message-----
From: Zhang, Hawking <[email protected]>
Sent: Wednesday, July 15, 2026 4:27 PM
To: Zhou1, Tao <[email protected]>; [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: RE: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

AMD General

+ init_config.debug_disable_ce_logs =
+ adev->debug_disable_ce_logs;

Let's pass the full amdgpu_debug_mask to ras core

Regards,
Hawking

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Wednesday, July 15, 2026 3:48 PM
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 5/5] drm/amd/ras: add ras ce log switch for uniras

So we can disable ce log manually.

---
 drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 1 +
 drivers/gpu/drm/amd/ras/rascore/ras.h            | 2 ++
 drivers/gpu/drm/amd/ras/rascore/ras_aca.c        | 7 ++++++-
 drivers/gpu/drm/amd/ras/rascore/ras_core.c       | 1 +
 4 files changed, 10 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +2 -1
index c55288c2df9a..1e95419989b4 100644
@@ -310,6 +310,7 @@ static struct ras_core_context
 *amdgpu_ras_mgr_create_ras_core(struct amdgpu_dev
                amdgpu_ras_mgr_eeprom_is_supported(adev);
        init_config.poison_supported =
                amdgpu_ras_is_poison_mode_supported(adev);
+       init_config.debug_disable_ce_logs =
+ adev->debug_disable_ce_logs;
 
        amdgpu_ras_mgr_init_aca_config(adev, &init_config);
        amdgpu_ras_mgr_init_eeprom_config(adev, &init_config); diff
--git a/drivers/gpu/drm/amd/ras/rascore/ras.h

b/drivers/gpu/drm/amd/ras/rascore/ras.h
index 5719bc1b6167..9d538a07c50e 100644

drivers/gpu/drm/amd/ras/rascore/ras.h +1 -0
@@ -301,6 +301,7 @@ struct ras_core_config {
 
        bool poison_supported;
        bool ras_eeprom_supported;
+       bool debug_disable_ce_logs;
        const struct ras_sys_func *sys_fn;
 
        struct ras_aca_config aca_cfg; @@ -348,6 +349,7 @@ struct
ras_core_context {
        bool ras_core_enabled;

        u64 ras_fw_features;

+ bool debug_disable_ce_logs;
};

struct ras_core_context *ras_core_create(struct ras_core_config
*init_config); diff -- git a/drivers/gpu/drm/amd/ras/rascore/ras_aca.c b/drivers/gpu/drm/amd/ras/rascore/ras_aca.c
index 67a35409ff0e..9760894c4c66 100644

drivers/gpu/drm/amd/ras/rascore/ras_aca.c +0 -0
@@ -98,7 +98,7 @@ static void aca_report_ecc_info(struct
 ras_core_context *ras_core,
                        blk_name(blk));
        }
 
Quoted 6 lines

drivers/gpu/drm/amd/ras/rascore/ras_aca.c static void aca_report_ecc_info(struct · line 103

Quoted 3 lines
drivers/gpu/drm/amd/ras/rascore/ras_aca.c +2 -1
-       if (ecc_count.new_ce_count) {
+       if (ecc_count.new_ce_count &&
+ !ras_core->debug_disable_ce_logs) {

[Thomas] Can we replace ras_core->debug_disable_ce_logs with the function interface in sun,ce patch? The other changes are the same.

[Tao] sure, Ce will update it.

Quoted 37 lines
Quoted 9 lines
drivers/gpu/drm/amd/ras/rascore/ras_aca.c +0 -0
                RAS_DEV_INFO(ras_core->dev,
                "{%llu} socket: %d, die: %d, %u new correctable

hardware errors detected in %s block\n",
seq_no, skt, aid, ecc_count.new_ce_count,
blk_name(blk)); @@ -

114,6 +114,11 @@ static void aca_bank_log(struct ras_core_context *ras_core,  {
        int i;

drivers/gpu/drm/amd/ras/rascore/ras_aca.c

Quoted 7 lines
drivers/gpu/drm/amd/ras/rascore/ras_aca.c +5 -0
+       if (ras_core->debug_disable_ce_logs &&
+           bank->ecc_type == RAS_ERR_TYPE__CE &&
+           !bank_ecc->real_de_count)
+               return;
+
        RAS_DEV_INFO(ras_core->dev,
                "{%llu}" RAS_HW_ERR "Accelerator Check Architecture events

logged\n",

Quoted 19 lines
                bank->seq_no);
drivers/gpu/drm/amd/ras/rascore/ras_core.c +2 -1
index 2346918c7736..cdef7727decb 100644
@@ -377,6 +377,7 @@ int ras_core_hw_init(struct ras_core_context *ras_core)
                        ras_core->config->ras_eeprom_supported;
 
        ras_core->poison_supported =
 ras_core->config->poison_supported;
+       ras_core->debug_disable_ce_logs =
+ras_core->config->debug_disable_ce_logs;
 
        ret = ras_psp_hw_init(ras_core);
        if (ret)
--

2.34.1