mirror of
https://github.com/torvalds/linux.git
synced 2024-11-24 13:11:40 +00:00
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
This commit is contained in:
parent
1d78416766
commit
9babd35ad7
@ -405,6 +405,9 @@ static int radeon_pmops_runtime_suspend(struct device *dev)
|
|||||||
if (radeon_runtime_pm == 0)
|
if (radeon_runtime_pm == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (radeon_runtime_pm == -1 && !radeon_is_px())
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
|
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
|
||||||
drm_kms_helper_poll_disable(drm_dev);
|
drm_kms_helper_poll_disable(drm_dev);
|
||||||
vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
|
vga_switcheroo_set_dynamic_switch(pdev, VGA_SWITCHEROO_OFF);
|
||||||
@ -427,6 +430,9 @@ static int radeon_pmops_runtime_resume(struct device *dev)
|
|||||||
if (radeon_runtime_pm == 0)
|
if (radeon_runtime_pm == 0)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
if (radeon_runtime_pm == -1 && !radeon_is_px())
|
||||||
|
return -EINVAL;
|
||||||
|
|
||||||
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
|
drm_dev->switch_power_state = DRM_SWITCH_POWER_CHANGING;
|
||||||
|
|
||||||
pci_set_power_state(pdev, PCI_D0);
|
pci_set_power_state(pdev, PCI_D0);
|
||||||
|
Loading…
Reference in New Issue
Block a user