diff options
author | Dave Airlie <airlied@redhat.com> | 2014-03-18 13:12:31 +0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-03-18 13:12:31 +0400 |
commit | bcc298bc924e0a990f853ba3e19f8b5a833cba7e (patch) | |
tree | 1c87c8f73dc41fd11ee3dacb1b91a7cc8b4798bb /drivers/gpu/drm/radeon/radeon_kms.c | |
parent | 978c6050165bba52eab7ef3581d447eb215def77 (diff) | |
parent | dcb99fd9b08cfe1afe426af4d8d3cbc429190f15 (diff) | |
download | linux-bcc298bc924e0a990f853ba3e19f8b5a833cba7e.tar.xz |
Merge tag 'v3.14-rc7' into drm-next
Linux 3.14-rc7
Backmerge to help out Intel guys.
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_kms.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c index 37b1deacb5b1..6f1dfac17507 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); @@ -567,6 +575,10 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv) if (r) return r; + r = radeon_bo_reserve(rdev->ring_tmp_bo.bo, false); + if (r) + return r; + /* map the ib pool buffer read only into * virtual address space */ bo_va = radeon_vm_bo_add(rdev, &fpriv->vm, |