mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-04 21:57:30 +00:00
drm/amdgpu: sdma handle ras resume
During S3/S4 bootloader will re-init ras state behind us. Resume might fail or raise a gpu reset. Signed-off-by: xinhui pan <xinhui.pan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: James Zhu <James.Zhu@amd.com> Tested-by: James Zhu <James.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2c2fc0cd0b
commit
777ac3ba3d
1 changed files with 18 additions and 1 deletions
|
@ -1523,8 +1523,25 @@ static int sdma_v4_0_late_init(void *handle)
|
|||
}
|
||||
|
||||
/* handle resume path. */
|
||||
if (*ras_if)
|
||||
if (*ras_if) {
|
||||
/* resend ras TA enable cmd during resume.
|
||||
* prepare to handle failure.
|
||||
*/
|
||||
ih_info.head = **ras_if;
|
||||
r = amdgpu_ras_feature_enable_on_boot(adev, *ras_if, 1);
|
||||
if (r) {
|
||||
if (r == -EAGAIN) {
|
||||
/* request a gpu reset. will run again. */
|
||||
amdgpu_ras_request_reset_on_boot(adev,
|
||||
AMDGPU_RAS_BLOCK__SDMA);
|
||||
return 0;
|
||||
}
|
||||
/* fail to enable ras, cleanup all. */
|
||||
goto irq;
|
||||
}
|
||||
/* enable successfully. continue. */
|
||||
goto resume;
|
||||
}
|
||||
|
||||
*ras_if = kmalloc(sizeof(**ras_if), GFP_KERNEL);
|
||||
if (!*ras_if)
|
||||
|
|
Loading…
Add table
Reference in a new issue