diff options
| author | Philip Yang <[email protected]> | 2022-09-16 13:30:43 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2022-09-21 19:25:46 +0000 |
| commit | c2dbd69e7b3a02b39ebac262c8c6c7f53df584c7 (patch) | |
| tree | 38216ece4986dfcaaddf730c2a7a2568a85d2405 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | |
| parent | drm/amdgpu: Use vm status_lock to protect vm evicted list (diff) | |
| download | kernel-c2dbd69e7b3a02b39ebac262c8c6c7f53df584c7.tar.gz kernel-c2dbd69e7b3a02b39ebac262c8c6c7f53df584c7.zip | |
drm/amdgpu: Use vm status_lock to protect pt free
Use vm_status_lock to protect all vm_status state transitions to allow
them to happen without a reservation lock in unlocked page table
updates.
Signed-off-by: Philip Yang <[email protected]>
Acked-by: Felix Kuehling <[email protected]>
Reviewed-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c index 88de9f0d4728..61a4b7182d44 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_pt.c @@ -637,7 +637,10 @@ static void amdgpu_vm_pt_free(struct amdgpu_vm_bo_base *entry) } ttm_bo_set_bulk_move(&entry->bo->tbo, NULL); entry->bo->vm_bo = NULL; + + spin_lock(&entry->vm->status_lock); list_del(&entry->vm_status); + spin_unlock(&entry->vm->status_lock); amdgpu_bo_unref(&entry->bo); } |
