aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-08-03 11:46:42 -0400
committerAlex Deucher <alexander.deucher@amd.com>2016-08-10 14:05:30 -0400
commit1303c73c61fea8cc5509e5b0e3cbe5253e260ca1 (patch)
treed5c61d1247a95d6fda92d13b7fd658760812f059 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parent3a8a6ab4a59fdc812fe020d97726ff925b341ec8 (diff)
drm/amdgpu: cleanup VM fragment defines
We can actually do way more than just the 64KB we currently used as default. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 3b7330c3825f..3d128c16334d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -830,6 +830,9 @@ struct amdgpu_ring {
830/* PTBs (Page Table Blocks) need to be aligned to 32K */ 830/* PTBs (Page Table Blocks) need to be aligned to 32K */
831#define AMDGPU_VM_PTB_ALIGN_SIZE 32768 831#define AMDGPU_VM_PTB_ALIGN_SIZE 32768
832 832
833/* LOG2 number of continuous pages for the fragment field */
834#define AMDGPU_LOG2_PAGES_PER_FRAG 4
835
833#define AMDGPU_PTE_VALID (1 << 0) 836#define AMDGPU_PTE_VALID (1 << 0)
834#define AMDGPU_PTE_SYSTEM (1 << 1) 837#define AMDGPU_PTE_SYSTEM (1 << 1)
835#define AMDGPU_PTE_SNOOPED (1 << 2) 838#define AMDGPU_PTE_SNOOPED (1 << 2)
@@ -840,10 +843,7 @@ struct amdgpu_ring {
840#define AMDGPU_PTE_READABLE (1 << 5) 843#define AMDGPU_PTE_READABLE (1 << 5)
841#define AMDGPU_PTE_WRITEABLE (1 << 6) 844#define AMDGPU_PTE_WRITEABLE (1 << 6)
842 845
843/* PTE (Page Table Entry) fragment field for different page sizes */ 846#define AMDGPU_PTE_FRAG(x) ((x & 0x1f) << 7)
844#define AMDGPU_PTE_FRAG_4KB (0 << 7)
845#define AMDGPU_PTE_FRAG_64KB (4 << 7)
846#define AMDGPU_LOG2_PAGES_PER_FRAG 4
847 847
848/* How to programm VM fault handling */ 848/* How to programm VM fault handling */
849#define AMDGPU_VM_FAULT_STOP_NEVER 0 849#define AMDGPU_VM_FAULT_STOP_NEVER 0