drm/amdgpu: move uniras IP version check to amdgpu_ras_init
Subsystems (2)
PATCH 1/2 drm/amdgpu: move uniras IP version check to amdgpu_ras_init
Late uniras enable in amdgpu_ras_mgr_sw_init leads to xxx_err_count sysfs node creation failure during NPS mode switching. Move the uniras IP version check into amdgpu_ras_init to set uniras_enabled ahead of sysfs node creation
--- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 11 +++++++++++ drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c | 10 +--------- 2 files changed, 12 insertions(+), 9 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +11 -0
@@ -3595,6 +3595,17 @@ int amdgpu_ras_init(struct amdgpu_device *adev) goto release_con; } +switch (amdgpu_ip_version (adev,MP0_HWIP ,0 )) { +case IP_VERSION (13 ,0 ,14 ): +case IP_VERSION (13 ,0 ,12 ): +case IP_VERSION (13 ,0 ,6 ): + con->uniras_enabled = true; +break ; +default : + con->uniras_enabled = false; +break ; + } + con->update_channel_flag = false; con->features =0 ; con->schema =0 ;
drivers/gpu/drm/amd/ras/ras_mgr/amdgpu_ras_mgr.c +1 -9
@@ -327,15 +327,7 @@ static int amdgpu_ras_mgr_sw_init(struct amdgpu_ip_block *ip_block)struct amdgpu_ras_mgr *ras_mgr;int ret =0 ; -/* Disabled by default */ - con->uniras_enabled = false; - -if (amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,14 ) || -amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,12 ) || -amdgpu_ip_version (adev,MP0_HWIP ,0 ) ==IP_VERSION (13 ,0 ,6 ) || - adev->debug_enable_ras_aca) - con->uniras_enabled = true; -else +if (!con->uniras_enabled)return 0 ; ras_mgr =kzalloc (sizeof (*ras_mgr),GFP_KERNEL );
Signature · 1 line
2.34.1