Skip to contentSkip to conversation

drm/amdgpu: set RAS fed status for more cases

PATCH In review Tao Zhou 2 participants 3 messages Jun 6, 2024 – Jun 7, 2024

Subsystems (3)
lore
Share & tools
lore

Tao Zhou

author
#0 lore raw

PATCH 1/2 drm/amdgpu: set RAS fed status for more cases

Indicate fatal error for each RAS block and NBIO.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 1 +
 drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c  | 1 +
 2 files changed, 2 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -0
index 77566dcc0852..183eae22b687 100644
@@ -2114,6 +2114,7 @@ static void amdgpu_ras_interrupt_umc_handler(struct ras_manager *obj,
 	/* Let IP handle its data, maybe we need get the output
 	 * from the callback to update the error type/count, etc
 	 */
+	amdgpu_ras_set_fed(obj->adev, true);
 	ret = data->cb(obj->adev, &err_data, entry);
 	/* ue will trigger an interrupt, and in that case
 	 * we need do a reset to recovery the whole system.
drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c +1 -0
index b8fc9e126e0d..9446bf6f82c1 100644
@@ -414,6 +414,7 @@ static void nbio_v7_4_handle_ras_controller_intr_no_bifring(struct amdgpu_device
 		/* ras_controller_int is dedicated for nbif ras error,
 		 * not the global interrupt for sync flood
 		 */
+		amdgpu_ras_set_fed(adev, true);
 		amdgpu_ras_reset_gpu(adev);
 	}
 
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/2 drm/amd/pm: update check condition for SMU mode1 reset

The fed status does indicate RAS fatal error.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c   | 2 +-
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +-
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +1 -1
index 04533f99f1e3..2c35eb31475a 100644
@@ -1876,7 +1876,7 @@ static int aldebaran_mode1_reset(struct smu_context *smu)
 		/* fatal error triggered by ras, PMFW supports the flag
 		   from 68.44.0 */
 		if ((smu->smc_fw_version >= 0x00442c00) &&
-		    amdgpu_ras_in_recovery(adev))
+		    amdgpu_ras_get_fed_status(adev))
 			fatal_err = 1;
 
 		param |= (fatal_err << 16);
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +1 -1
index d1766a603bb9..c9639141792f 100644
@@ -2788,7 +2788,7 @@ static void smu_v13_0_0_set_mode1_reset_param(struct smu_context *smu,
 	struct amdgpu_device *adev = smu->adev;
 
 	if ((smu->smc_fw_version >= supported_version) &&
-	    amdgpu_ras_in_recovery(adev))
+	    amdgpu_ras_get_fed_status(adev))
 		/* Set RAS fatal error reset flag */
 		*param = 1 << 16;
 	else
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +1 -1
index c1d7528a6dc8..7fda7196fa7c 100644
@@ -2580,7 +2580,7 @@ static int smu_v13_0_6_mode1_reset(struct smu_context *smu)
 	param = SMU_RESET_MODE_1;
 
 	/* fatal error triggered by ras, PMFW supports the flag */
-	if (amdgpu_ras_in_recovery(adev))
+	if (amdgpu_ras_get_fed_status(adev))
 		fatal_err = 1;
 
 	param |= (fatal_err << 16);
Signature · 1 line
2.34.1
Reviewed-by on v1 2/2
#2 lore raw

RE: [PATCH 2/2] drm/amd/pm: update check condition for SMU mode1 reset

[AMD Official Use Only - AMD Internal Distribution Only]

Series is

Regards,
Hawking
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Tao Zhou
Sent: Thursday, June 6, 2024 18:06
To: [email protected]
Cc: Zhou1, Tao <[email protected]>
Subject: [PATCH 2/2] drm/amd/pm: update check condition for SMU mode1 reset

The fed status does indicate RAS fatal error.

---
 drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c   | 2 +-
 drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +-  drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c +1 -1
index 04533f99f1e3..2c35eb31475a 100644
@@ -1876,7 +1876,7 @@ static int aldebaran_mode1_reset(struct smu_context *smu)
                /* fatal error triggered by ras, PMFW supports the flag
                   from 68.44.0 */
                if ((smu->smc_fw_version >= 0x00442c00) &&
-                   amdgpu_ras_in_recovery(adev))
+                   amdgpu_ras_get_fed_status(adev))
                        fatal_err = 1;
 
                param |= (fatal_err << 16);
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c +1 -1
index d1766a603bb9..c9639141792f 100644
@@ -2788,7 +2788,7 @@ static void smu_v13_0_0_set_mode1_reset_param(struct smu_context *smu,
        struct amdgpu_device *adev = smu->adev;
 
        if ((smu->smc_fw_version >= supported_version) &&
-           amdgpu_ras_in_recovery(adev))
+           amdgpu_ras_get_fed_status(adev))
                /* Set RAS fatal error reset flag */
                *param = 1 << 16;
        else
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c +1 -1
index c1d7528a6dc8..7fda7196fa7c 100644
@@ -2580,7 +2580,7 @@ static int smu_v13_0_6_mode1_reset(struct smu_context *smu)
        param = SMU_RESET_MODE_1;
 
        /* fatal error triggered by ras, PMFW supports the flag */
-       if (amdgpu_ras_in_recovery(adev))
+       if (amdgpu_ras_get_fed_status(adev))
                fatal_err = 1;
 
        param |= (fatal_err << 16);

--
2.34.1