summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2014-01-24 14:59:42 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-02-13 13:55:39 -0800
commitf01f17fbe6600eb4949bb3b15eb8bd11d8d53419 (patch)
tree8443930897e9c1e352fd2c1585656e4afd00d4cf
parent1e575f142bd6d130cebffe4dfbdd4ecc77afd1a1 (diff)
downloadlinux-stable-f01f17fbe6600eb4949bb3b15eb8bd11d8d53419.tar.gz
linux-stable-f01f17fbe6600eb4949bb3b15eb8bd11d8d53419.tar.bz2
linux-stable-f01f17fbe6600eb4949bb3b15eb8bd11d8d53419.zip
drm/radeon/runpm: don't runtime suspend non-PX cards
commit 9babd35ad72af631547c7ca294bc2e931cc40e58 upstream. Prevent runtime suspend of non-PX GPUs. Runtime suspend is not what we want in those cases. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/gpu/drm/radeon/radeon_drv.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index db39ea36bf22..5fa8196c03e3 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -400,6 +400,9 @@ static int radeon_pmops_runtime_suspend(struct device *dev)
if (radeon_runtime_pm == 0)
return -EINVAL;
+ if (radeon_runtime_pm == -1 && !radeon_is_px())
+ return -EINVAL;
+
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
drm_kms_helper_poll_disable(drm_dev);
vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
@@ -422,6 +425,9 @@ static int radeon_pmops_runtime_resume(struct device *dev)
if (radeon_runtime_pm == 0)
return -EINVAL;
+ if (radeon_runtime_pm == -1 && !radeon_is_px())
+ return -EINVAL;
+
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
pci_set_power_state(pdev, PCI_D0);