drm/amdgpu: Fix ras mode2 reset failure in ras aca mode
authorYiPeng Chai <YiPeng.Chai@amd.com>
Wed, 24 Apr 2024 02:21:30 +0000 (10:21 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Apr 2024 21:22:43 +0000 (17:22 -0400)
Fix ras mode2 reset failure in ras aca mode.

Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-by: Yang Wang <kevinyang.wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c

index 8c58fd8a08de0d02c5f0838b0f41c48f23d37261..1adc81a55734d9252b79fcb1d75b52bcbfad6b34 100644 (file)
@@ -1250,6 +1250,10 @@ int amdgpu_ras_bind_aca(struct amdgpu_device *adev, enum amdgpu_ras_block blk,
 {
        struct ras_manager *obj;
 
+       /* in resume phase, no need to create aca fs node */
+       if (adev->in_suspend || amdgpu_in_reset(adev))
+               return 0;
+
        obj = get_ras_manager(adev, blk);
        if (!obj)
                return -EINVAL;