]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: Enable ras module
authorYiPeng Chai <YiPeng.Chai@amd.com>
Thu, 20 Mar 2025 09:04:14 +0000 (17:04 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 20 Oct 2025 22:26:05 +0000 (18:26 -0400)
Enable ras module, disabled by default.

Signed-off-by: YiPeng Chai <YiPeng.Chai@amd.com>
Reviewed-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/ras/ras_mgr/amdgpu_ras_mgr.c

index 3ae843d078d85c65abfcbd75f42397b74a323a8e..13c207c8a8430ad4bdbb4330e783d518632b64d3 100644 (file)
@@ -335,6 +335,11 @@ static int amdgpu_ras_mgr_hw_init(struct amdgpu_ip_block *ip_block)
        struct amdgpu_ras_mgr *ras_mgr = amdgpu_ras_mgr_get_context(adev);
        int ret;
 
+       /* Currently only debug mode can enable the ras module
+        */
+       if (!adev->debug_enable_ras_aca)
+               return 0;
+
        if (!ras_mgr || !ras_mgr->ras_core)
                return -EINVAL;
 
@@ -346,6 +351,8 @@ static int amdgpu_ras_mgr_hw_init(struct amdgpu_ip_block *ip_block)
 
        ras_mgr->ras_is_ready = true;
 
+       amdgpu_enable_uniras(adev, true);
+
        RAS_DEV_INFO(adev, "AMDGPU RAS Is Ready.\n");
        return 0;
 }
@@ -355,6 +362,11 @@ static int amdgpu_ras_mgr_hw_fini(struct amdgpu_ip_block *ip_block)
        struct amdgpu_device *adev = ip_block->adev;
        struct amdgpu_ras_mgr *ras_mgr = amdgpu_ras_mgr_get_context(adev);
 
+       /* Currently only debug mode can enable the ras module
+        */
+       if (!adev->debug_enable_ras_aca)
+               return 0;
+
        if (!ras_mgr || !ras_mgr->ras_core)
                return -EINVAL;