Skip to content

Commit

Permalink
drm/amdgpu: add fbdev suspend/resume on gpu reset
Browse files Browse the repository at this point in the history
This can fix the baco reset failure seen on Navi10.
And this should be a low risk fix as the same sequence
is already used for system suspend/resume.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Evan Quan authored and alexdeucher committed Mar 13, 2020
1 parent 88474cc commit 565d194
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -3933,6 +3933,8 @@ static int amdgpu_do_asic_reset(struct amdgpu_hive_info *hive,
if (r)
goto out;

amdgpu_fbdev_set_suspend(tmp_adev, 0);

/* must succeed. */
amdgpu_ras_resume(tmp_adev);

Expand Down Expand Up @@ -4106,6 +4108,8 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
*/
amdgpu_unregister_gpu_instance(tmp_adev);

amdgpu_fbdev_set_suspend(adev, 1);

/* disable ras on ALL IPs */
if (!(in_ras_intr && !use_baco) &&
amdgpu_device_ip_need_full_reset(tmp_adev))
Expand Down

0 comments on commit 565d194

Please sign in to comment.