]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
Merge tag 'amd-drm-next-5.19-2022-05-18' of https://gitlab.freedesktop.org/agd5f...
[thirdparty/linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_vm.c
index f9479e23de1855649807a7f6bb19e78c79fb08f4..2ceeaa4c793aec1243386b81c6fd93b08058ec8f 100644 (file)
@@ -581,7 +581,8 @@ int amdgpu_vm_flush(struct amdgpu_ring *ring, struct amdgpu_job *job,
        }
        dma_fence_put(fence);
 
-       if (ring->funcs->emit_gds_switch && gds_switch_needed) {
+       if (!ring->is_mes_queue && ring->funcs->emit_gds_switch &&
+           gds_switch_needed) {
                id->gds_base = job->gds_base;
                id->gds_size = job->gds_size;
                id->gws_base = job->gws_base;
@@ -705,6 +706,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,