diff options
author | Philip Yang <Philip.Yang@amd.com> | 2022-05-10 10:29:54 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-05-10 17:53:13 -0400 |
commit | 5be323562c6a699d38430bc068a3fd192be8ed0d (patch) | |
tree | b2cd563e624598a0e024a3294493b52e1cb9ed46 /drivers/gpu/drm | |
parent | 688ea54949c5dd95732e99d46de23a919311a9ea (diff) |
drm/amdgpu: vm flush needed after updating PDEs
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@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 |
1 files changed, 3 insertions, 0 deletions
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, |