aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index ff093d4b5e11..4e465e817fe8 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -111,12 +111,12 @@ struct amdgpu_vm_bo_base {
111}; 111};
112 112
113struct amdgpu_vm_pt { 113struct amdgpu_vm_pt {
114 struct amdgpu_bo *bo; 114 struct amdgpu_vm_bo_base base;
115 uint64_t addr; 115 uint64_t addr;
116 116
117 /* array of page tables, one for each directory entry */ 117 /* array of page tables, one for each directory entry */
118 struct amdgpu_vm_pt *entries; 118 struct amdgpu_vm_pt *entries;
119 unsigned last_entry_used; 119 unsigned last_entry_used;
120}; 120};
121 121
122struct amdgpu_vm { 122struct amdgpu_vm {
@@ -126,6 +126,9 @@ struct amdgpu_vm {
126 /* protecting invalidated */ 126 /* protecting invalidated */
127 spinlock_t status_lock; 127 spinlock_t status_lock;
128 128
129 /* BOs who needs a validation */
130 struct list_head evicted;
131
129 /* BOs moved, but not yet updated in the PT */ 132 /* BOs moved, but not yet updated in the PT */
130 struct list_head moved; 133 struct list_head moved;
131 134
@@ -135,7 +138,6 @@ struct amdgpu_vm {
135 /* contains the page directory */ 138 /* contains the page directory */
136 struct amdgpu_vm_pt root; 139 struct amdgpu_vm_pt root;
137 struct dma_fence *last_dir_update; 140 struct dma_fence *last_dir_update;
138 uint64_t last_eviction_counter;
139 141
140 /* protecting freed */ 142 /* protecting freed */
141 spinlock_t freed_lock; 143 spinlock_t freed_lock;
@@ -225,7 +227,7 @@ void amdgpu_vm_fini(struct amdgpu_device *adev, struct amdgpu_vm *vm);
225void amdgpu_vm_get_pd_bo(struct amdgpu_vm *vm, 227void amdgpu_vm_get_pd_bo(struct amdgpu_vm *vm,
226 struct list_head *validated, 228 struct list_head *validated,
227 struct amdgpu_bo_list_entry *entry); 229 struct amdgpu_bo_list_entry *entry);
228bool amdgpu_vm_ready(struct amdgpu_device *adev, struct amdgpu_vm *vm); 230bool amdgpu_vm_ready(struct amdgpu_vm *vm);
229int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm, 231int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
230 int (*callback)(void *p, struct amdgpu_bo *bo), 232 int (*callback)(void *p, struct amdgpu_bo *bo),
231 void *param); 233 void *param);
@@ -250,7 +252,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev,
250 struct amdgpu_bo_va *bo_va, 252 struct amdgpu_bo_va *bo_va,
251 bool clear); 253 bool clear);
252void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, 254void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev,
253 struct amdgpu_bo *bo); 255 struct amdgpu_bo *bo, bool evicted);
254struct amdgpu_bo_va *amdgpu_vm_bo_find(struct amdgpu_vm *vm, 256struct amdgpu_bo_va *amdgpu_vm_bo_find(struct amdgpu_vm *vm,
255 struct amdgpu_bo *bo); 257 struct amdgpu_bo *bo);
256struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev, 258struct amdgpu_bo_va *amdgpu_vm_bo_add(struct amdgpu_device *adev,