drm/amdgpu: stop/resume fb access when gpu reset V3

V2: Add wait_for_mc_idle after stopping fb access
V3:
	1. Remove resume fb access since there is no need to
   	do that for gpu reset.
	2. Move stop fb access to amdgpu_gpu_reset function,
	since it's the same for all asics.

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com> (V1)
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Chunming Zhou 2016-06-28 10:38:50 +08:00 committed by Alex Deucher
parent e013c91c06
commit f1aa7e082e
1 changed files with 7 additions and 0 deletions

View File

@ -1969,6 +1969,13 @@ int amdgpu_gpu_reset(struct amdgpu_device *adev)
} }
retry: retry:
/* Disable fb access */
if (adev->mode_info.num_crtc) {
struct amdgpu_mode_mc_save save;
amdgpu_display_stop_mc_access(adev, &save);
amdgpu_wait_for_idle(adev, AMD_IP_BLOCK_TYPE_GMC);
}
r = amdgpu_asic_reset(adev); r = amdgpu_asic_reset(adev);
/* post card */ /* post card */
amdgpu_atom_asic_init(adev->mode_info.atom_context); amdgpu_atom_asic_init(adev->mode_info.atom_context);