]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
drm/amdgpu: set runtime pm state to active on resume
authorAlex Deucher <alexander.deucher@amd.com>
Sat, 27 Aug 2016 18:53:08 +0000 (14:53 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Sep 2016 14:34:45 +0000 (10:34 -0400)
The sbios always powers up the dGPU on resume.

Acked-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

index 28c3dcc170ccc7d75f9184de298c176cc9bf601a..94d013526e8eb1c7613244f5c1b5791328991743 100644 (file)
@@ -482,6 +482,14 @@ static int amdgpu_pmops_resume(struct device *dev)
 {
        struct pci_dev *pdev = to_pci_dev(dev);
        struct drm_device *drm_dev = pci_get_drvdata(pdev);
+
+       /* GPU comes up enabled by the bios on resume */
+       if (amdgpu_device_is_px(drm_dev)) {
+               pm_runtime_disable(dev);
+               pm_runtime_set_active(dev);
+               pm_runtime_enable(dev);
+       }
+
        return amdgpu_device_resume(drm_dev, true, true);
 }