drm/amdgpu: Allow issue disable gfx ras cmd to firmware
authorHawking Zhang <Hawking.Zhang@amd.com>
Thu, 24 Aug 2023 08:18:59 +0000 (16:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Aug 2023 19:25:54 +0000 (15:25 -0400)
Disable gfx ras command is needed in some use cases

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Tao Zhou <tao.zhou1@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

index 378478cf9c21ce6cff6e3d49d94d03082ff412c8..e47600a8e88eb48cb6ed02c87abf2d48e4100389 100644 (file)
@@ -769,9 +769,10 @@ int amdgpu_ras_feature_enable(struct amdgpu_device *adev,
        if (!con)
                return -EINVAL;
 
-       /* Do not enable ras feature if it is not allowed */
-       if (enable &&
-           head->block != AMDGPU_RAS_BLOCK__GFX &&
+       /* For non-gfx ip, do not enable ras feature if it is not allowed */
+       /* For gfx ip, regardless of feature support status, */
+       /* Force issue enable or disable ras feature commands */
+       if (head->block != AMDGPU_RAS_BLOCK__GFX &&
            !amdgpu_ras_is_feature_allowed(adev, head))
                goto out;