Like amdgpu_device_reset_sriov does, kfd suspend should be called at the beginning to make sure kfd BO is idle. Otherwise the extra amdgpu_device_evict_resources fails or amdgpu_virt_request_full_gpu timeout. Signed-off-by: xinhui pan <xinhui.pan@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a084c3c58a32..ef7c7f2b3260 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -4148,6 +4148,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) adev->in_suspend = true; + if (!adev->in_s0ix) + amdgpu_amdkfd_suspend(adev, adev->in_runpm); + /* Evict the majority of BOs before grabbing the full access */ r = amdgpu_device_evict_resources(adev); if (r) @@ -4174,9 +4177,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon) amdgpu_device_ip_suspend_phase1(adev); - if (!adev->in_s0ix) - amdgpu_amdkfd_suspend(adev, adev->in_runpm); - r = amdgpu_device_evict_resources(adev); if (r) return r; -- 2.34.1