OSDN Git Service

drm/amdgpu: move kfd suspend after ip_suspend_phase1
authorEvan Quan <evan.quan@amd.com>
Fri, 24 Apr 2020 07:32:41 +0000 (15:32 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Apr 2020 19:51:49 +0000 (15:51 -0400)
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.

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>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index f9b315e..e51e735 100644 (file)
@@ -3435,12 +3435,12 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
        amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
        amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
 
-       amdgpu_amdkfd_suspend(adev, !fbcon);
-
        amdgpu_ras_suspend(adev);
 
        r = amdgpu_device_ip_suspend_phase1(adev);
 
+       amdgpu_amdkfd_suspend(adev, !fbcon);
+
        /* evict vram memory */
        amdgpu_bo_evict_vram(adev);