aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/radeon_vm.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2014-05-10 06:17:56 -0400
committerAlex Deucher <alexander.deucher@amd.com>2014-06-02 10:25:03 -0400
commit1c89d27fb9f169003c5a82561ffeb8adb980ebfb (patch)
tree5d5541d1c768e6dd7ce4ce16e33109860fb734b7 /drivers/gpu/drm/radeon/radeon_vm.c
parentec3dbbcbd7a6ee165ca7eeafec8dbc733901ab2f (diff)
drm/radeon: add proper support for RADEON_VM_BLOCK_SIZE v2
This patch makes it possible to decide how many address bits are spend on the page directory vs the page tables. v2: remove unintended change Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_vm.c')
-rw-r--r--drivers/gpu/drm/radeon/radeon_vm.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index f8d5b65932e5..a128a4fd64b3 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -964,6 +964,8 @@ void radeon_vm_bo_invalidate(struct radeon_device *rdev,
964 */ 964 */
965int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm) 965int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm)
966{ 966{
967 const unsigned align = min(RADEON_VM_PTB_ALIGN_SIZE,
968 RADEON_VM_PTE_COUNT * 8);
967 unsigned pd_size, pd_entries, pts_size; 969 unsigned pd_size, pd_entries, pts_size;
968 int r; 970 int r;
969 971
@@ -985,7 +987,7 @@ int radeon_vm_init(struct radeon_device *rdev, struct radeon_vm *vm)
985 return -ENOMEM; 987 return -ENOMEM;
986 } 988 }
987 989
988 r = radeon_bo_create(rdev, pd_size, RADEON_VM_PTB_ALIGN_SIZE, false, 990 r = radeon_bo_create(rdev, pd_size, align, false,
989 RADEON_GEM_DOMAIN_VRAM, NULL, 991 RADEON_GEM_DOMAIN_VRAM, NULL,
990 &vm->page_directory); 992 &vm->page_directory);
991 if (r) 993 if (r)