aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
diff options
context:
space:
mode:
authorAndrey Grodzovsky <andrey.grodzovsky@amd.com>2017-11-13 14:47:52 -0500
committerAlex Deucher <alexander.deucher@amd.com>2017-12-06 12:48:31 -0500
commitcebb52b7bc325863600aff930407bba773010938 (patch)
treeae833fc3ca280acdf24acb6955d99e604bc9d018 /drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
parent97489129c220ef67195c886f9f2bad9651edd601 (diff)
drm/amdgpu: Get rid of dep_sync as a seperate object.
Instead mark fence as explicit in it's amdgpu_sync_entry. v2: Fix use after free bug and add new parameter description. Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 7de519b86b78..3ecdbdfb04dd 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -488,7 +488,7 @@ static int amdgpu_vm_grab_reserved_vmid_locked(struct amdgpu_vm *vm,
488 id->pd_gpu_addr = 0; 488 id->pd_gpu_addr = 0;
489 tmp = amdgpu_sync_peek_fence(&id->active, ring); 489 tmp = amdgpu_sync_peek_fence(&id->active, ring);
490 if (tmp) { 490 if (tmp) {
491 r = amdgpu_sync_fence(adev, sync, tmp); 491 r = amdgpu_sync_fence(adev, sync, tmp, false);
492 return r; 492 return r;
493 } 493 }
494 } 494 }
@@ -496,7 +496,7 @@ static int amdgpu_vm_grab_reserved_vmid_locked(struct amdgpu_vm *vm,
496 /* Good we can use this VMID. Remember this submission as 496 /* Good we can use this VMID. Remember this submission as
497 * user of the VMID. 497 * user of the VMID.
498 */ 498 */
499 r = amdgpu_sync_fence(ring->adev, &id->active, fence); 499 r = amdgpu_sync_fence(ring->adev, &id->active, fence, false);
500 if (r) 500 if (r)
501 goto out; 501 goto out;
502 502
@@ -583,7 +583,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
583 } 583 }
584 584
585 585
586 r = amdgpu_sync_fence(ring->adev, sync, &array->base); 586 r = amdgpu_sync_fence(ring->adev, sync, &array->base, false);
587 dma_fence_put(&array->base); 587 dma_fence_put(&array->base);
588 if (r) 588 if (r)
589 goto error; 589 goto error;
@@ -626,7 +626,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
626 /* Good we can use this VMID. Remember this submission as 626 /* Good we can use this VMID. Remember this submission as
627 * user of the VMID. 627 * user of the VMID.
628 */ 628 */
629 r = amdgpu_sync_fence(ring->adev, &id->active, fence); 629 r = amdgpu_sync_fence(ring->adev, &id->active, fence, false);
630 if (r) 630 if (r)
631 goto error; 631 goto error;
632 632
@@ -646,7 +646,7 @@ int amdgpu_vm_grab_id(struct amdgpu_vm *vm, struct amdgpu_ring *ring,
646 id = idle; 646 id = idle;
647 647
648 /* Remember this submission as user of the VMID */ 648 /* Remember this submission as user of the VMID */
649 r = amdgpu_sync_fence(ring->adev, &id->active, fence); 649 r = amdgpu_sync_fence(ring->adev, &id->active, fence, false);
650 if (r) 650 if (r)
651 goto error; 651 goto error;
652 652
@@ -1657,7 +1657,7 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
1657 addr = 0; 1657 addr = 0;
1658 } 1658 }
1659 1659
1660 r = amdgpu_sync_fence(adev, &job->sync, exclusive); 1660 r = amdgpu_sync_fence(adev, &job->sync, exclusive, false);
1661 if (r) 1661 if (r)
1662 goto error_free; 1662 goto error_free;
1663 1663