aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2016-03-08 09:40:11 -0500
committerAlex Deucher <alexander.deucher@amd.com>2016-05-04 20:19:13 -0400
commitbcb1ba35a87be34d1312f6e050f1b5cc4d32f096 (patch)
treea06cb56e8d388d33e8162b06d0320475e5caef29 /drivers/gpu/drm/amd/amdgpu/amdgpu.h
parentbd4c72d1e9dd7efdb9a990225f32e0130c0884af (diff)
drm/amdgpu: merge VM manager and VM context ID structure
No need to have two of them any more. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Chunming Zhou <david1.zhou@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.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index b9a6fe9a2a31..c1b10046317e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -839,13 +839,6 @@ struct amdgpu_vm_pt {
839 uint64_t addr; 839 uint64_t addr;
840}; 840};
841 841
842struct amdgpu_vm_id {
843 struct amdgpu_vm_manager_id *mgr_id;
844 uint64_t pd_gpu_addr;
845 /* last flushed PD/PT update */
846 struct fence *flushed_updates;
847};
848
849struct amdgpu_vm { 842struct amdgpu_vm {
850 /* tree of virtual addresses mapped */ 843 /* tree of virtual addresses mapped */
851 struct rb_root va; 844 struct rb_root va;
@@ -871,7 +864,7 @@ struct amdgpu_vm {
871 struct amdgpu_vm_pt *page_tables; 864 struct amdgpu_vm_pt *page_tables;
872 865
873 /* for id and flush management per ring */ 866 /* for id and flush management per ring */
874 struct amdgpu_vm_id ids[AMDGPU_MAX_RINGS]; 867 struct amdgpu_vm_id *ids[AMDGPU_MAX_RINGS];
875 868
876 /* protecting freed */ 869 /* protecting freed */
877 spinlock_t freed_lock; 870 spinlock_t freed_lock;
@@ -880,11 +873,15 @@ struct amdgpu_vm {
880 struct amd_sched_entity entity; 873 struct amd_sched_entity entity;
881}; 874};
882 875
883struct amdgpu_vm_manager_id { 876struct amdgpu_vm_id {
884 struct list_head list; 877 struct list_head list;
885 struct fence *active; 878 struct fence *active;
886 atomic_long_t owner; 879 atomic_long_t owner;
887 880
881 uint64_t pd_gpu_addr;
882 /* last flushed PD/PT update */
883 struct fence *flushed_updates;
884
888 uint32_t gds_base; 885 uint32_t gds_base;
889 uint32_t gds_size; 886 uint32_t gds_size;
890 uint32_t gws_base; 887 uint32_t gws_base;
@@ -898,7 +895,7 @@ struct amdgpu_vm_manager {
898 struct mutex lock; 895 struct mutex lock;
899 unsigned num_ids; 896 unsigned num_ids;
900 struct list_head ids_lru; 897 struct list_head ids_lru;
901 struct amdgpu_vm_manager_id ids[AMDGPU_NUM_VM]; 898 struct amdgpu_vm_id ids[AMDGPU_NUM_VM];
902 899
903 uint32_t max_pfn; 900 uint32_t max_pfn;
904 /* vram base address for page table entry */ 901 /* vram base address for page table entry */