drm/amd/pm: update check condition for SMU mode1 reset
authorTao Zhou <tao.zhou1@amd.com>
Thu, 6 Jun 2024 03:30:16 +0000 (11:30 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 14 Jun 2024 20:18:26 +0000 (16:18 -0400)
The fed status does indicate RAS fatal error.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

index 04533f9..2c35eb3 100644 (file)
@@ -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);
index ce9b770..a887ab9 100644 (file)
@@ -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
index 6790095..78c3f94 100644 (file)
@@ -2581,7 +2581,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);