Skip to content

Commit

Permalink
drm/radeon/runpm: don't runtime suspend non-PX cards
Browse files Browse the repository at this point in the history
Prevent runtime suspend of non-PX GPUs.  Runtime suspend is
not what we want in those cases.

Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected]
  • Loading branch information
alexdeucher committed Jan 29, 2014
1 parent 1d78416 commit 9babd35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/gpu/drm/radeon/radeon_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,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);
Expand All @@ -427,6 +430,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);
Expand Down

0 comments on commit 9babd35

Please sign in to comment.