drm/radeon: set runtime pm state to active on resume
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 31 Aug 2016 21:34:23 +0000 (17:34 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 2 Sep 2016 14:34:46 +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/radeon/radeon_drv.c

index 8faa4d55d0600e534092bfb1dd87f4d034d6a932..c9e6928e06d408bc6969e5177afb6b4e2591d3a6 100644 (file)
@@ -374,6 +374,14 @@ static int radeon_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 (radeon_is_px(drm_dev)) {
+               pm_runtime_disable(dev);
+               pm_runtime_set_active(dev);
+               pm_runtime_enable(dev);
+       }
+
        return radeon_resume_kms(drm_dev, true, true);
 }