summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiangliang Yu <Xiangliang.Yu@amd.com>2017-01-18 05:47:55 +0100
committerAlex Deucher <alexander.deucher@amd.com>2017-01-27 17:13:39 +0100
commite941ea997d3388dd6d6a8712453c13caacc7a966 (patch)
tree791ddc8acc40a21df5a975f6cbf2384ac7bf7820
parentdrm/amd/amdgpu: Add PCI info to gca_config debugfs (diff)
downloadlinux-e941ea997d3388dd6d6a8712453c13caacc7a966.tar.xz
linux-e941ea997d3388dd6d6a8712453c13caacc7a966.zip
drm/amdgpu: fix reboot failure issue for virtualization
Reboot process will call HW fini functions of IP blocks. For virt, need to send event three before hw fini and send event four after hw fini. Signed-off-by: Xiangliang Yu <Xiangliang.Yu@amd.com> Reviewed-by: Monk Liu <Monk.Liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index b408a54638a4..786c3c3bb48d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1565,6 +1565,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)
{
int i, r;
+ if (amdgpu_sriov_vf(adev))
+ amdgpu_virt_request_full_gpu(adev, false);
+
/* ungate SMC block first */
r = amdgpu_set_clockgating_state(adev, AMD_IP_BLOCK_TYPE_SMC,
AMD_CG_STATE_UNGATE);
@@ -1593,6 +1596,9 @@ int amdgpu_suspend(struct amdgpu_device *adev)
}
}
+ if (amdgpu_sriov_vf(adev))
+ amdgpu_virt_release_full_gpu(adev, false);
+
return 0;
}