aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2017-04-06 11:52:39 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-04-28 17:32:18 -0400
commit7645670decdb677e2f415ff91609d31e5d4777d8 (patch)
tree1faecd5906e3e29c70e66446b70f86f5cf1231d3 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
parent4f618e737fafed22302d4b660eecfe1dce971b0f (diff)
drm/amdgpu: split VMID management by VMHUB
This way GFX and MM won't fight for VMIDs any more. Initially disabled since we need to stop flushing all HUBS at the same time as well. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Andres Rodriguez <andresx7@gmail.com> Acked-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_vm.h')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index ba9c39317dd3..661a8f6826ef 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -146,12 +146,16 @@ struct amdgpu_vm_id {
146 uint32_t oa_size; 146 uint32_t oa_size;
147}; 147};
148 148
149struct amdgpu_vm_id_manager {
150 struct mutex lock;
151 unsigned num_ids;
152 struct list_head ids_lru;
153 struct amdgpu_vm_id ids[AMDGPU_NUM_VM];
154};
155
149struct amdgpu_vm_manager { 156struct amdgpu_vm_manager {
150 /* Handling of VMIDs */ 157 /* Handling of VMIDs */
151 struct mutex lock; 158 struct amdgpu_vm_id_manager id_mgr[AMDGPU_MAX_VMHUBS];
152 unsigned num_ids;
153 struct list_head ids_lru;
154 struct amdgpu_vm_id ids[AMDGPU_NUM_VM];
155 159
156 /* Handling of VM fences */ 160 /* Handling of VM fences */
157 u64 fence_context; 161 u64 fence_context;
@@ -197,7 +201,8 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
197 struct amdgpu_sync *sync, struct dma_fence *fence, 201 struct amdgpu_sync *sync, struct dma_fence *fence,
198 struct amdgpu_job *job); 202 struct amdgpu_job *job);
199int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job); 203int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job);
200void amdgpu_vm_reset_id(struct amdgpu_device *adev, unsigned vm_id); 204void amdgpu_vm_reset_id(struct amdgpu_device *adev, unsigned vmhub,
205 unsigned vmid);
201int amdgpu_vm_update_directories(struct amdgpu_device *adev, 206int amdgpu_vm_update_directories(struct amdgpu_device *adev,
202 struct amdgpu_vm *vm); 207 struct amdgpu_vm *vm);
203int amdgpu_vm_clear_freed(struct amdgpu_device *adev, 208int amdgpu_vm_clear_freed(struct amdgpu_device *adev,