drm/amdgpu: vm flush needed after updating PDEs
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +3 -0
@@ -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,
Signature · 1 line
2.35.1
Am 10.05.22 um 16:36 schrieb Philip Yang:
Quoted 5 lines
If page table PDEs is evicted and restored, after updating PDEs, need increase
vm->tlb_seq, thenamdgpu_vm_flushwill flush TLB before command submission.Signed-off-by Philip Yang <[email protected]>
Reviewed-by Christian König <[email protected]>
Quoted 18 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 3 +++ 1 file changed, 3 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +3
-0@@ -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,