Skip to content

Commit 01f2cf5

Browse files
drm/amdgpu: use DRM_SCHED_FENCE_DONT_PIPELINE for VM updates
Make sure that we always have a CPU round trip to let the submission code correctly decide if a TLB flush is necessary or not. Signed-off-by: Christian König <[email protected]> Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/2113#note_1579296 Reviewed-by: Alex Deucher <[email protected]> Acked-by: Luben Tuikov <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 7b476af commit 01f2cf5

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,15 @@ static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p,
115115
amdgpu_bo_fence(p->vm->root.bo, f, true);
116116
}
117117

118-
if (fence && !p->immediate)
118+
if (fence && !p->immediate) {
119+
/*
120+
* Most hw generations now have a separate queue for page table
121+
* updates, but when the queue is shared with userspace we need
122+
* the extra CPU round trip to correctly flush the TLB.
123+
*/
124+
set_bit(DRM_SCHED_FENCE_DONT_PIPELINE, &f->flags);
119125
swap(*fence, f);
126+
}
120127
dma_fence_put(f);
121128
return 0;
122129

0 commit comments

Comments
 (0)