diff options
author | Roger He <Hongbo.He@amd.com> | 2017-08-11 08:00:41 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-08-17 15:46:08 -0400 |
commit | e618d306ded38dc9d37c04dc37e24bf9d62e9c7b (patch) | |
tree | 9373307774e178887e6723a13ecc0c1e9ac8b705 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | |
parent | 27c7b9aeecd7c06a3b527795807c19a0bbe25c1e (diff) |
drm/amd/amdgpu: store fragment_size in vm_manager
adds fragment_size in the vm_manager structure and
implements hardware setup for it.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h index a740b57e9eee..45a276960d02 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | |||
@@ -50,11 +50,6 @@ struct amdgpu_bo_list_entry; | |||
50 | /* PTBs (Page Table Blocks) need to be aligned to 32K */ | 50 | /* PTBs (Page Table Blocks) need to be aligned to 32K */ |
51 | #define AMDGPU_VM_PTB_ALIGN_SIZE 32768 | 51 | #define AMDGPU_VM_PTB_ALIGN_SIZE 32768 |
52 | 52 | ||
53 | /* LOG2 number of continuous pages for the fragment field */ | ||
54 | #define AMDGPU_LOG2_PAGES_PER_FRAG(adev) \ | ||
55 | ((adev)->asic_type < CHIP_VEGA10 ? 4 : \ | ||
56 | (adev)->vm_manager.block_size) | ||
57 | |||
58 | #define AMDGPU_PTE_VALID (1ULL << 0) | 53 | #define AMDGPU_PTE_VALID (1ULL << 0) |
59 | #define AMDGPU_PTE_SYSTEM (1ULL << 1) | 54 | #define AMDGPU_PTE_SYSTEM (1ULL << 1) |
60 | #define AMDGPU_PTE_SNOOPED (1ULL << 2) | 55 | #define AMDGPU_PTE_SNOOPED (1ULL << 2) |
@@ -200,6 +195,7 @@ struct amdgpu_vm_manager { | |||
200 | uint32_t num_level; | 195 | uint32_t num_level; |
201 | uint64_t vm_size; | 196 | uint64_t vm_size; |
202 | uint32_t block_size; | 197 | uint32_t block_size; |
198 | uint32_t fragment_size; | ||
203 | /* vram base address for page table entry */ | 199 | /* vram base address for page table entry */ |
204 | u64 vram_base_offset; | 200 | u64 vram_base_offset; |
205 | /* vm pte handling */ | 201 | /* vm pte handling */ |