Commit a891d239 authored by Dennis Li's avatar Dennis Li Committed by Alex Deucher

drm/amdgpu: set error query ready after all IPs late init

If set error query ready in amdgpu_ras_late_init, which will
cause some IP blocks aren't initialized, but their error query
is ready.
Signed-off-by: default avatarDennis Li <Dennis.Li@amd.com>
Reviewed-by: default avatarGuchun Chen <guchun.chen@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 7dd8c205
...@@ -2216,6 +2216,8 @@ static int amdgpu_device_ip_late_init(struct amdgpu_device *adev) ...@@ -2216,6 +2216,8 @@ static int amdgpu_device_ip_late_init(struct amdgpu_device *adev)
adev->ip_blocks[i].status.late_initialized = true; adev->ip_blocks[i].status.late_initialized = true;
} }
amdgpu_ras_set_error_query_ready(adev, true);
amdgpu_device_set_cg_state(adev, AMD_CG_STATE_GATE); amdgpu_device_set_cg_state(adev, AMD_CG_STATE_GATE);
amdgpu_device_set_pg_state(adev, AMD_PG_STATE_GATE); amdgpu_device_set_pg_state(adev, AMD_PG_STATE_GATE);
......
...@@ -1921,10 +1921,8 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev, ...@@ -1921,10 +1921,8 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev,
} }
/* in resume phase, no need to create ras fs node */ /* in resume phase, no need to create ras fs node */
if (adev->in_suspend || adev->in_gpu_reset) { if (adev->in_suspend || adev->in_gpu_reset)
amdgpu_ras_set_error_query_ready(adev, true);
return 0; return 0;
}
if (ih_info->cb) { if (ih_info->cb) {
r = amdgpu_ras_interrupt_add_handler(adev, ih_info); r = amdgpu_ras_interrupt_add_handler(adev, ih_info);
...@@ -1936,8 +1934,6 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev, ...@@ -1936,8 +1934,6 @@ int amdgpu_ras_late_init(struct amdgpu_device *adev,
if (r) if (r)
goto sysfs; goto sysfs;
amdgpu_ras_set_error_query_ready(adev, true);
return 0; return 0;
cleanup: cleanup:
amdgpu_ras_sysfs_remove(adev, ras_block); amdgpu_ras_sysfs_remove(adev, ras_block);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment