| From 890e23f7b74155ff6356b2eaa867112f1b54da1c Mon Sep 17 00:00:00 2001 |
| From: Evan Quan <evan.quan@amd.com> |
| Date: Fri, 24 Apr 2020 15:32:41 +0800 |
| Subject: [PATCH] drm/amdgpu: move kfd suspend after ip_suspend_phase1 |
| |
| commit c457a273e118bb96e1db8d1825f313e6cafe4258 upstream. |
| |
| This sequence change should be safe as what did in ip_suspend_phase1 |
| is to suspend DCE only. And this is a prerequisite for coming |
| redundant cg/pg ungate dropping. |
| |
| Fixes: 487eca11a321ef ("drm/amdgpu: fix gfx hang during suspend with video playback (v2)") |
| Signed-off-by: Evan Quan <evan.quan@amd.com> |
| Acked-by: Alex Deucher <alexander.deucher@amd.com> |
| Signed-off-by: Alex Deucher <alexander.deucher@amd.com> |
| Cc: stable@vger.kernel.org |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| |
| diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| index 5f12205657c7..4ae260e268a4 100644 |
| --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| @@ -2849,8 +2849,6 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) |
| } |
| } |
| |
| - amdgpu_amdkfd_suspend(adev); |
| - |
| r = amdgpu_device_ip_suspend_phase1(adev); |
| |
| /* evict vram memory */ |
| @@ -2860,6 +2858,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) |
| |
| r = amdgpu_device_ip_suspend_phase2(adev); |
| |
| + amdgpu_amdkfd_suspend(adev); |
| + |
| /* evict remaining vram memory |
| * This second call to evict vram is to evict the gart page table |
| * using the CPU. |
| -- |
| 2.7.4 |
| |