diff options
author | Christian König <christian.koenig@amd.com> | 2019-12-04 13:29:49 +0100 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-12-09 17:02:26 -0500 |
commit | b4ff0f8a85f3c523942e57b716e8722e7f6799cc (patch) | |
tree | cc5be8d2b48a5aec50e0fc4813e26b3429da88b2 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | |
parent | 90b69cdc5f159be09d799257661e119a26ea4233 (diff) |
drm/amdgpu: add VM eviction lock v3
This allows to invalidate VM entries without taking the reservation lock.
v3: use -EBUSY
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@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, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h index 6c2124b10820..7e0eb36da27d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h @@ -239,6 +239,10 @@ struct amdgpu_vm { /* tree of virtual addresses mapped */ struct rb_root_cached va; + /* Lock to prevent eviction while we are updating page tables */ + struct mutex eviction_lock; + bool evicting; + /* BOs who needs a validation */ struct list_head evicted; |