From: Thadeu Lima de Souza Cascardo <[email protected]>

Stop walking on an update error, then commit existing work and complete
the TLB and temporary page-table-list cleanup. The void commit callback
does not overwrite the original update result.

The preceding internal completion tracking orders finalization after
the latest submitted IB, including immediate and rollover submissions.

[zmu: Rebase on commit-void and the internal completion prerequisite.]
Link: 
https://lore.kernel.org/amd-gfx/[email protected]/
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
Signed-off-by: Zihao Mu <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 3b4df22c5ed..3f3c5a82fc1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -1276,7 +1276,7 @@ int amdgpu_vm_update_range(struct amdgpu_device *adev, 
struct amdgpu_vm *vm,
                tmp = start + num_entries;
                r = amdgpu_vm_ptes_update(&params, start, tmp, addr, flags);
                if (r)
-                       goto error_free;
+                       break;
 
                amdgpu_res_next(&cursor, num_entries * AMDGPU_GPU_PAGE_SIZE);
                start = tmp;
-- 
2.43.0

Reply via email to