diff options
author | Christian König <christian.koenig@amd.com> | 2018-04-19 04:56:02 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-24 11:07:52 -0400 |
commit | af4c0f650b563c7b30c1d8cd2bb926247ceb19cc (patch) | |
tree | 92238b98187bcf270b5b8b269bd93a16f67af695 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | |
parent | 22cc6c5e1958e5a08b4c44203d1810ab07ce5a16 (diff) |
drm/amdgpu: rework VM state machine lock handling v2
Only the moved state needs a separate spin lock protection. All other
states are protected by reserving the VM anyway.
v2: fix some more incorrect cases
Signed-off-by: Christian König <christian.koenig@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_vm.h')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h index d6827083572a..0196b9a782f2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | |||
@@ -168,9 +168,6 @@ struct amdgpu_vm { | |||
168 | /* tree of virtual addresses mapped */ | 168 | /* tree of virtual addresses mapped */ |
169 | struct rb_root_cached va; | 169 | struct rb_root_cached va; |
170 | 170 | ||
171 | /* protecting invalidated */ | ||
172 | spinlock_t status_lock; | ||
173 | |||
174 | /* BOs who needs a validation */ | 171 | /* BOs who needs a validation */ |
175 | struct list_head evicted; | 172 | struct list_head evicted; |
176 | 173 | ||
@@ -179,6 +176,7 @@ struct amdgpu_vm { | |||
179 | 176 | ||
180 | /* BOs moved, but not yet updated in the PT */ | 177 | /* BOs moved, but not yet updated in the PT */ |
181 | struct list_head moved; | 178 | struct list_head moved; |
179 | spinlock_t moved_lock; | ||
182 | 180 | ||
183 | /* BO mappings freed, but not yet updated in the PT */ | 181 | /* BO mappings freed, but not yet updated in the PT */ |
184 | struct list_head freed; | 182 | struct list_head freed; |