If page table PDEs is evicted and restored, after updating PDEs, need increase vm->tlb_seq, then amdgpu_vm_flush will flush TLB before command submission. Signed-off-by: Philip Yang <Philip.Yang@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 7276b03ef970..9596c22fded6 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c @@ -764,6 +764,9 @@ int amdgpu_vm_update_pdes(struct amdgpu_device *adev, if (r) goto error; + /* vm_flush_needed after updating PDEs */ + atomic64_inc(&vm->tlb_seq); + while (!list_empty(&vm->relocated)) { entry = list_first_entry(&vm->relocated, struct amdgpu_vm_bo_base, -- 2.35.1