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

Zhang, Hawking Hawking.Zhang at amd.com
Fri Jun 7 06:02:42 UTC 2024


[AMD Official Use Only - AMD Internal Distribution Only]

Series is

Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>

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

The fed status does indicate RAS fatal error.

Signed-off-by: Tao Zhou <tao.zhou1 at amd.com>
---
 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(-)

diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
index 04533f99f1e3..2c35eb31475a 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
@@ -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);
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
index d1766a603bb9..c9639141792f 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
@@ -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
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
index c1d7528a6dc8..7fda7196fa7c 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
@@ -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



More information about the amd-gfx mailing list