summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYiPeng Chai <YiPeng.Chai@amd.com>2025-03-20 17:04:14 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-10-20 18:26:05 -0400
commit6588766d08e35b692d839194af581f06cb7b77c6 (patch)
tree857afc9a5ca8b5b1a414b30d3236c5e429c48101
parent46791d147d3ab3262298478106ef2a52fc7192e2 (diff)
drm/amdgpu: Enable ras module
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>
-rw-r--r--drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c
index 3ae843d078d8..13c207c8a843 100644
--- a/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c
+++ b/drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c
@@ -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;