]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amdgpu: Add tlb_cb for unlocked update
authorPhilip Yang <Philip.Yang@amd.com>
Mon, 28 Mar 2022 02:22:44 +0000 (22:22 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 1 Apr 2022 03:05:53 +0000 (23:05 -0400)
Flush TLB needs wait for GPU update fence done. MMU notify callback to
unmap range from GPUs uses unlocked GPU page table update, so add tlb_cb
to unlocked update fence to increase vm->tlb_seq.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index 48f32660997698fa59b83d1ac4d3b96c5b14851a..683b08f756edb5af79bb6d7afda08ca520199ab6 100644 (file)
@@ -927,7 +927,7 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
 
        r = vm->update_funcs->commit(&params, fence);
 
-       if (!unlocked && (!(flags & AMDGPU_PTE_VALID) || params.table_freed)) {
+       if (!(flags & AMDGPU_PTE_VALID) || params.table_freed) {
                tlb_cb->vm = vm;
                if (!fence || !*fence ||
                    dma_fence_add_callback(*fence, &tlb_cb->cb,