]> Git Repo - linux.git/commitdiff
drm/amdgpu: fix the hibernation suspend with s0ix
authorPrike Liang <[email protected]>
Tue, 9 Mar 2021 01:34:00 +0000 (09:34 +0800)
committerAlex Deucher <[email protected]>
Fri, 9 Apr 2021 20:36:17 +0000 (16:36 -0400)
During system hibernation suspend still need un-gate gfx CG/PG firstly to handle HW
status check before HW resource destory.

Signed-off-by: Prike Liang <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Acked-by: Huang Rui <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 1c3044f2e767473f02c38c986ee916b6bae4b3a7..87ebf67086e076e6fec7b853b4a49fc5ffca586d 100644 (file)
@@ -2685,7 +2685,7 @@ static int amdgpu_device_ip_suspend_phase1(struct amdgpu_device *adev)
 {
        int i, r;
 
-       if (adev->in_poweroff_reboot_com ||
+       if (adev->in_poweroff_reboot_com || adev->in_hibernate ||
            !amdgpu_acpi_is_s0ix_supported(adev) || amdgpu_in_reset(adev)) {
                amdgpu_device_set_pg_state(adev, AMD_PG_STATE_UNGATE);
                amdgpu_device_set_cg_state(adev, AMD_CG_STATE_UNGATE);
@@ -3766,7 +3766,11 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
 
        amdgpu_fence_driver_suspend(adev);
 
-       if (adev->in_poweroff_reboot_com ||
+       /*
+        * TODO: Need figure out the each GNB IP idle off dependency and then
+        * improve the AMDGPU suspend/resume sequence for system-wide Sx entry/exit.
+        */
+       if (adev->in_poweroff_reboot_com || adev->in_hibernate ||
            !amdgpu_acpi_is_s0ix_supported(adev) || amdgpu_in_reset(adev))
                r = amdgpu_device_ip_suspend_phase2(adev);
        else
This page took 0.079288 seconds and 4 git commands to generate.