drm/amdgpu: move pci_save_state into suspend path
authorAlex Deucher <alexander.deucher@amd.com>
Fri, 4 Oct 2019 19:33:39 +0000 (14:33 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 15 Oct 2019 19:51:39 +0000 (15:51 -0400)
for amdgpu_device_suspend.  This follows the logic
in the resume path.

Reviewed-by: Evan Quan <evan.quan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 75a0db3..9532338 100644 (file)
@@ -3171,8 +3171,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
         */
        amdgpu_bo_evict_vram(adev);
 
-       pci_save_state(dev->pdev);
        if (suspend) {
+               pci_save_state(dev->pdev);
                /* Shut down the device */
                pci_disable_device(dev->pdev);
                pci_set_power_state(dev->pdev, PCI_D3hot);