summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_gart.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_gart.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_gart.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index 3ef58cab18c9..8597d2c016e6 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -286,6 +286,8 @@ int radeon_vm_manager_init(struct radeon_device *rdev)
{
int r;
+ rdev->vm_manager.enabled = false;
+
/* mark first vm as always in use, it's the system one */
r = radeon_sa_bo_manager_init(rdev, &rdev->vm_manager.sa_manager,
rdev->vm_manager.max_pfn * 8,
@@ -295,7 +297,12 @@ int radeon_vm_manager_init(struct radeon_device *rdev)
(rdev->vm_manager.max_pfn * 8) >> 10);
return r;
}
- return rdev->vm_manager.funcs->init(rdev);
+
+ r = rdev->vm_manager.funcs->init(rdev);
+ if (r == 0)
+ rdev->vm_manager.enabled = true;
+
+ return r;
}
/* cs mutex must be lock */
@@ -334,6 +341,7 @@ void radeon_vm_manager_fini(struct radeon_device *rdev)
radeon_vm_manager_suspend(rdev);
rdev->vm_manager.funcs->fini(rdev);
radeon_sa_bo_manager_fini(rdev, &rdev->vm_manager.sa_manager);
+ rdev->vm_manager.enabled = false;
}
int radeon_vm_manager_start(struct radeon_device *rdev)
OpenPOWER on IntegriCloud