Merge drm/drm-fixes into drm-misc-fixes
[linux-block.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_vm_sdma.c
index 2b0669c464f636442589a96f91fed29dae28a600..69e105fa41f68461e58e91c1444fdd9246977449 100644 (file)
@@ -116,8 +116,15 @@ static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p,
                                   DMA_RESV_USAGE_BOOKKEEP);
        }
 
-       if (fence && !p->immediate)
+       if (fence && !p->immediate) {
+               /*
+                * Most hw generations now have a separate queue for page table
+                * updates, but when the queue is shared with userspace we need
+                * the extra CPU round trip to correctly flush the TLB.
+                */
+               set_bit(DRM_SCHED_FENCE_DONT_PIPELINE, &f->flags);
                swap(*fence, f);
+       }
        dma_fence_put(f);
        return 0;