diff options
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_gart.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_gart.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c index 59d44937dd9f..84b648a7ddd8 100644 --- a/drivers/gpu/drm/radeon/radeon_gart.c +++ b/drivers/gpu/drm/radeon/radeon_gart.c | |||
@@ -289,8 +289,9 @@ int radeon_vm_manager_init(struct radeon_device *rdev) | |||
289 | rdev->vm_manager.enabled = false; | 289 | rdev->vm_manager.enabled = false; |
290 | 290 | ||
291 | /* mark first vm as always in use, it's the system one */ | 291 | /* mark first vm as always in use, it's the system one */ |
292 | /* allocate enough for 2 full VM pts */ | ||
292 | r = radeon_sa_bo_manager_init(rdev, &rdev->vm_manager.sa_manager, | 293 | r = radeon_sa_bo_manager_init(rdev, &rdev->vm_manager.sa_manager, |
293 | rdev->vm_manager.max_pfn * 8, | 294 | rdev->vm_manager.max_pfn * 8 * 2, |
294 | RADEON_GEM_DOMAIN_VRAM); | 295 | RADEON_GEM_DOMAIN_VRAM); |
295 | if (r) { | 296 | if (r) { |
296 | dev_err(rdev->dev, "failed to allocate vm bo (%dKB)\n", | 297 | dev_err(rdev->dev, "failed to allocate vm bo (%dKB)\n", |
@@ -633,7 +634,15 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm) | |||
633 | mutex_init(&vm->mutex); | 634 | mutex_init(&vm->mutex); |
634 | INIT_LIST_HEAD(&vm->list); | 635 | INIT_LIST_HEAD(&vm->list); |
635 | INIT_LIST_HEAD(&vm->va); | 636 | INIT_LIST_HEAD(&vm->va); |
636 | vm->last_pfn = 0; | 637 | /* SI requires equal sized PTs for all VMs, so always set |
638 | * last_pfn to max_pfn. cayman allows variable sized | ||
639 | * pts so we can grow then as needed. Once we switch | ||
640 | * to two level pts we can unify this again. | ||
641 | */ | ||
642 | if (rdev->family >= CHIP_TAHITI) | ||
643 | vm->last_pfn = rdev->vm_manager.max_pfn; | ||
644 | else | ||
645 | vm->last_pfn = 0; | ||
637 | /* map the ib pool buffer at 0 in virtual address space, set | 646 | /* map the ib pool buffer at 0 in virtual address space, set |
638 | * read only | 647 | * read only |
639 | */ | 648 | */ |