diff options
| author | Alex Deucher <alexander.deucher@amd.com> | 2014-01-24 14:59:42 -0500 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2014-01-29 15:23:03 -0500 |
| commit | 9babd35ad72af631547c7ca294bc2e931cc40e58 (patch) | |
| tree | 0fa3c2fc8cd0b09bb58ce7e6e5f931c73ae28160 /drivers/gpu | |
| parent | 1d7841676676691c205bfcb3d99c5997466a3408 (diff) | |
drm/radeon/runpm: don't runtime suspend non-PX cards
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>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/radeon/radeon_drv.c | 6 |
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 1235a78fbba1..ec8c388eec17 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c | |||
| @@ -405,6 +405,9 @@ static int radeon_pmops_runtime_suspend(struct device *dev) | |||
| 405 | if (radeon_runtime_pm == 0) | 405 | if (radeon_runtime_pm == 0) |
| 406 | return -EINVAL; | 406 | return -EINVAL; |
| 407 | 407 | ||
| 408 | if (radeon_runtime_pm == -1 && !radeon_is_px()) | ||
| 409 | return -EINVAL; | ||
| 410 | |||
| 408 | drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; | 411 | drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; |
| 409 | drm_kms_helper_poll_disable(drm_dev); | 412 | drm_kms_helper_poll_disable(drm_dev); |
| 410 | vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF); | 413 | vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF); |
| @@ -427,6 +430,9 @@ static int radeon_pmops_runtime_resume(struct device *dev) | |||
| 427 | if (radeon_runtime_pm == 0) | 430 | if (radeon_runtime_pm == 0) |
| 428 | return -EINVAL; | 431 | return -EINVAL; |
| 429 | 432 | ||
| 433 | if (radeon_runtime_pm == -1 && !radeon_is_px()) | ||
| 434 | return -EINVAL; | ||
| 435 | |||
| 430 | drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; | 436 | drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING; |
| 431 | 437 | ||
| 432 | pci_set_power_state(pdev, PCI_D0); | 438 | pci_set_power_state(pdev, PCI_D0); |
