mirror of
https://github.com/torvalds/linux.git
synced 2026-10-11 21:07:03 +02:00
drm/amdgpu/gfx8: Stop CP and RLC during reset
The only case when they may not go idle is when we are dealing with a GPU hang, in which case we should just forcibly disable these even when they aren't idle. Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
1fc76380c6
commit
a25d644890
|
|
@ -4868,14 +4868,12 @@ static int gfx_v8_0_hw_fini(struct amdgpu_ip_block *ip_block)
|
|||
}
|
||||
|
||||
amdgpu_gfx_rlc_enter_safe_mode(adev, 0);
|
||||
if (!gfx_v8_0_wait_for_idle(ip_block))
|
||||
gfx_v8_0_cp_enable(adev, false);
|
||||
else
|
||||
if (!amdgpu_in_reset(adev) && gfx_v8_0_wait_for_idle(ip_block))
|
||||
pr_err("cp is busy, skip halt cp\n");
|
||||
if (!gfx_v8_0_wait_for_rlc_idle(adev))
|
||||
adev->gfx.rlc.funcs->stop(adev);
|
||||
else
|
||||
pr_err("rlc is busy, skip halt rlc\n");
|
||||
if (!amdgpu_in_reset(adev) && gfx_v8_0_wait_for_rlc_idle(adev))
|
||||
pr_err("rlc is busy\n");
|
||||
gfx_v8_0_cp_enable(adev, false);
|
||||
adev->gfx.rlc.funcs->stop(adev);
|
||||
amdgpu_gfx_rlc_exit_safe_mode(adev, 0);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user