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>
This commit is contained in:
Christian König
2019-12-04 13:29:49 +01:00
committed by Alex Deucher
parent 90b69cdc5f
commit b4ff0f8a85
2 changed files with 38 additions and 9 deletions

View File

@@ -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;