diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2014-03-11 19:02:30 (GMT) |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-03-12 19:53:23 (GMT) |
commit | 7848865914c6a63ead674f0f5604b77df7d3874f (patch) | |
tree | 2e4c2661f27846647159d44c6ea9aa890431de53 /drivers | |
parent | 45db98e54242f3ae94bdcfbfe754e743252eb168 (diff) | |
download | linux-7848865914c6a63ead674f0f5604b77df7d3874f.tar.xz |
drm/radeon: fix runpm disabling on non-PX harder
Make sure runtime pm is disabled on non-PX hardware.
Should fix powerdown problems without displays attached.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 2aecd6d..66ed3ea 100644 --- a/drivers/gpu/drm/radeon/radeon_kms.c +++ b/drivers/gpu/drm/radeon/radeon_kms.c @@ -33,6 +33,13 @@ #include <linux/vga_switcheroo.h> #include <linux/slab.h> #include <linux/pm_runtime.h> + +#if defined(CONFIG_VGA_SWITCHEROO) +bool radeon_is_px(void); +#else +static inline bool radeon_is_px(void) { return false; } +#endif + /** * radeon_driver_unload_kms - Main unload function for KMS. * @@ -130,7 +137,8 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags) "Error during ACPI methods call\n"); } - if (radeon_runtime_pm != 0) { + if ((radeon_runtime_pm == 1) || + ((radeon_runtime_pm == -1) && radeon_is_px())) { pm_runtime_use_autosuspend(dev->dev); pm_runtime_set_autosuspend_delay(dev->dev, 5000); pm_runtime_set_active(dev->dev); |