drm/amdgpu: remove extra root PD alignment
authorChristian König <christian.koenig@amd.com>
Wed, 22 Aug 2018 13:47:37 +0000 (15:47 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 27 Aug 2018 20:12:23 +0000 (15:12 -0500)
Just another leftover from radeon.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h

index b905d7901248160d1fa4a52b6d3172b3b7eac5d0..5ef755458d3eb1683caef05940f421fbcf9bd53f 100644 (file)
@@ -2612,8 +2612,6 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
 {
        struct amdgpu_bo_param bp;
        struct amdgpu_bo *root;
-       const unsigned align = min(AMDGPU_VM_PTB_ALIGN_SIZE,
-               AMDGPU_VM_PTE_COUNT(adev) * 8);
        unsigned long size;
        uint64_t flags;
        int r, i;
@@ -2662,7 +2660,7 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
        size = amdgpu_vm_bo_size(adev, adev->vm_manager.root_level);
        memset(&bp, 0, sizeof(bp));
        bp.size = size;
-       bp.byte_align = align;
+       bp.byte_align = AMDGPU_GPU_PAGE_SIZE;
        bp.domain = AMDGPU_GEM_DOMAIN_VRAM;
        bp.flags = flags;
        bp.type = ttm_bo_type_kernel;
index 7a461eb76d44594d10e10deeb31b03aa2c62ea4f..94fe47890adfc89c0c92dd4831b3c98e6cb69fc8 100644 (file)
@@ -49,9 +49,6 @@ struct amdgpu_bo_list_entry;
 /* number of entries in page table */
 #define AMDGPU_VM_PTE_COUNT(adev) (1 << (adev)->vm_manager.block_size)
 
-/* PTBs (Page Table Blocks) need to be aligned to 32K */
-#define AMDGPU_VM_PTB_ALIGN_SIZE   32768
-
 #define AMDGPU_PTE_VALID       (1ULL << 0)
 #define AMDGPU_PTE_SYSTEM      (1ULL << 1)
 #define AMDGPU_PTE_SNOOPED     (1ULL << 2)