OSDN Git Service

drm/amdgpu: enable RAS poison flag when GPU is connected to CPU
authorTao Zhou <tao.zhou1@amd.com>
Wed, 8 Dec 2021 06:01:09 +0000 (14:01 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 13 Dec 2021 21:32:34 +0000 (16:32 -0500)
The RAS poison mode is enabled by default on the platform.

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/amdgpu/amdgpu_ras.c

index a95d200..0003f2c 100644 (file)
@@ -2372,7 +2372,11 @@ int amdgpu_ras_init(struct amdgpu_device *adev)
        }
 
        /* Init poison supported flag, the default value is false */
-       if (adev->df.funcs &&
+       if (adev->gmc.xgmi.connected_to_cpu) {
+               /* enabled by default when GPU is connected to CPU */
+               con->poison_supported = true;
+       }
+       else if (adev->df.funcs &&
            adev->df.funcs->query_ras_poison_mode &&
            adev->umc.ras_funcs &&
            adev->umc.ras_funcs->query_ras_poison_mode) {