aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_kms.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_kms.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_kms.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 8309b11e674d..3cf9c1fa6475 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -34,6 +34,8 @@
34#include <linux/slab.h> 34#include <linux/slab.h>
35#include <linux/pm_runtime.h> 35#include <linux/pm_runtime.h>
36 36
37#include "radeon_kfd.h"
38
37#if defined(CONFIG_VGA_SWITCHEROO) 39#if defined(CONFIG_VGA_SWITCHEROO)
38bool radeon_has_atpx(void); 40bool radeon_has_atpx(void);
39#else 41#else
@@ -63,6 +65,8 @@ int radeon_driver_unload_kms(struct drm_device *dev)
63 65
64 pm_runtime_get_sync(dev->dev); 66 pm_runtime_get_sync(dev->dev);
65 67
68 radeon_kfd_device_fini(rdev);
69
66 radeon_acpi_fini(rdev); 70 radeon_acpi_fini(rdev);
67 71
68 radeon_modeset_fini(rdev); 72 radeon_modeset_fini(rdev);
@@ -142,6 +146,9 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
142 "Error during ACPI methods call\n"); 146 "Error during ACPI methods call\n");
143 } 147 }
144 148
149 radeon_kfd_device_probe(rdev);
150 radeon_kfd_device_init(rdev);
151
145 if (radeon_is_px(dev)) { 152 if (radeon_is_px(dev)) {
146 pm_runtime_use_autosuspend(dev->dev); 153 pm_runtime_use_autosuspend(dev->dev);
147 pm_runtime_set_autosuspend_delay(dev->dev, 5000); 154 pm_runtime_set_autosuspend_delay(dev->dev, 5000);
@@ -621,8 +628,6 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
621 RADEON_VA_IB_OFFSET, 628 RADEON_VA_IB_OFFSET,
622 RADEON_VM_PAGE_READABLE | 629 RADEON_VM_PAGE_READABLE |
623 RADEON_VM_PAGE_SNOOPED); 630 RADEON_VM_PAGE_SNOOPED);
624
625 radeon_bo_unreserve(rdev->ring_tmp_bo.bo);
626 if (r) { 631 if (r) {
627 radeon_vm_fini(rdev, vm); 632 radeon_vm_fini(rdev, vm);
628 kfree(fpriv); 633 kfree(fpriv);
@@ -795,6 +800,8 @@ int radeon_get_vblank_timestamp_kms(struct drm_device *dev, int crtc,
795 800
796 /* Get associated drm_crtc: */ 801 /* Get associated drm_crtc: */
797 drmcrtc = &rdev->mode_info.crtcs[crtc]->base; 802 drmcrtc = &rdev->mode_info.crtcs[crtc]->base;
803 if (!drmcrtc)
804 return -EINVAL;
798 805
799 /* Helper routine in DRM core does all the work: */ 806 /* Helper routine in DRM core does all the work: */
800 return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error, 807 return drm_calc_vbltimestamp_from_scanoutpos(dev, crtc, max_error,