]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
drm/amdgpu: sync to the active user on reusing a VMID
authorChristian König <christian.koenig@amd.com>
Thu, 3 Mar 2016 09:50:01 +0000 (10:50 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 8 Mar 2016 16:01:45 +0000 (11:01 -0500)
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

index d9dc8bea5e98f51496683d7beddede288c5b4290..364db7c45c67f2f7ac62360ce12c5321adabefec 100644 (file)
@@ -188,6 +188,13 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
                if (!is_later && owner == (long)id &&
                    pd_addr == id->pd_gpu_addr) {
 
+                       r = amdgpu_sync_fence(ring->adev, sync,
+                                             id->mgr_id->active);
+                       if (r) {
+                               mutex_unlock(&adev->vm_manager.lock);
+                               return r;
+                       }
+
                        fence_put(id->mgr_id->active);
                        id->mgr_id->active = fence_get(fence);