[AMD Public Use]

Although we unified check ecc capability to ras_init, we still need to query 
the ecc capability here to apply the vega10 specific workaround. So we don't 
need to call the atomfirmware helper again, but leverage adev->ras_features to 
decide apply the workaround or not.

Regards,
Hawking

-----Original Message-----
From: Chen, Guchun <guchun.c...@amd.com> 
Sent: Tuesday, September 29, 2020 12:56
To: amd-gfx@lists.freedesktop.org; Deucher, Alexander 
<alexander.deuc...@amd.com>; Zhang, Hawking <hawking.zh...@amd.com>; Li, Dennis 
<dennis...@amd.com>; Zhou1, Tao <tao.zh...@amd.com>; Clements, John 
<john.cleme...@amd.com>
Cc: Chen, Guchun <guchun.c...@amd.com>
Subject: [PATCH] drm/amdgpu: drop duplicated ecc check for vega10

The same ECC check has been executed in amdgpu_ras_init for vega10, prior to 
gmc_v9_0_late_init.

Signed-off-by: Guchun Chen <guchun.c...@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
index 3dddbc60fe3d..f72acb7cfea3 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
@@ -1193,21 +1193,14 @@ static int gmc_v9_0_late_init(void *handle)
        r = amdgpu_gmc_allocate_vm_inv_eng(adev);
        if (r)
                return r;
-       /* Check if ecc is available */
+
+       /* apply DF parity workaround */
        if (!amdgpu_sriov_vf(adev) && (adev->asic_type == CHIP_VEGA10)) {
                r = amdgpu_atomfirmware_mem_ecc_supported(adev);
                if (!r) {
-                       DRM_INFO("ECC is not present.\n");
                        if (adev->df.funcs->enable_ecc_force_par_wr_rmw)
                                
adev->df.funcs->enable_ecc_force_par_wr_rmw(adev, false);
-               } else
-                       DRM_INFO("ECC is active.\n");
-
-               r = amdgpu_atomfirmware_sram_ecc_supported(adev);
-               if (!r)
-                       DRM_INFO("SRAM ECC is not present.\n");
-               else
-                       DRM_INFO("SRAM ECC is active.\n");
+               }
        }
 
        if (adev->mmhub.funcs && adev->mmhub.funcs->reset_ras_error_count)
--
2.17.1
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to