diff options
author | Christian König <christian.koenig@amd.com> | 2015-07-06 22:06:40 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:50:13 -0400 |
commit | 91e1a5207edec9e4f888e44478a9a254186e0ba8 (patch) | |
tree | d03a1e06f744981034fb67eeb15b8d1644816278 /drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | |
parent | 0b492a4c92050862a9780b941d52c05923fcd669 (diff) | |
download | linux-91e1a5207edec9e4f888e44478a9a254186e0ba8.tar.bz2 |
drm/amdgpu: deal with foreign fences in amdgpu_sync
This also requires some error handling from the callers of that function.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Chunming Zhou <david1.zhou@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c index bc0fac618a3f..2722815eddbb 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c @@ -167,7 +167,11 @@ int amdgpu_ib_schedule(struct amdgpu_device *adev, unsigned num_ibs, /* grab a vm id if necessary */ struct amdgpu_fence *vm_id_fence = NULL; vm_id_fence = amdgpu_vm_grab_id(ibs->ring, ibs->vm); - amdgpu_sync_fence(&ibs->sync, vm_id_fence); + r = amdgpu_sync_fence(adev, &ibs->sync, &vm_id_fence->base); + if (r) { + amdgpu_ring_unlock_undo(ring); + return r; + } } r = amdgpu_sync_rings(&ibs->sync, ring); |