From: YiPeng Chai Date: Thu, 20 Mar 2025 09:04:14 +0000 (+0800) Subject: drm/amdgpu: Enable ras module X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6588766d08e35b692d839194af581f06cb7b77c6;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: Enable ras module Enable ras module, disabled by default. Signed-off-by: YiPeng Chai Reviewed-by: Tao Zhou Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- 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 3ae843d078d85..13c207c8a8430 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;