diff options
| author | Christian König <[email protected]> | 2015-07-27 13:40:35 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2015-08-17 20:50:40 +0000 |
| commit | 1d3897e056d2ff2bb3b17e054aa75d36adacaacc (patch) | |
| tree | 967cf824e7531f9856e7f8a1bd8e9c496e45d9ed /drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | |
| parent | drm/amdgpu: add check for callback (diff) | |
| download | kernel-1d3897e056d2ff2bb3b17e054aa75d36adacaacc.tar.gz kernel-1d3897e056d2ff2bb3b17e054aa75d36adacaacc.zip | |
drm/amdgpu: fix syncing to VM updates
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c')
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index 105a3b515174..2c42f50912b9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c @@ -122,11 +122,24 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, f = rcu_dereference_protected(flist->shared[i], reservation_object_held(resv)); fence = f ? to_amdgpu_fence(f) : NULL; - if (fence && fence->ring->adev == adev && - fence->owner == owner && - fence->owner != AMDGPU_FENCE_OWNER_UNDEFINED) + if (fence && fence->ring->adev == adev) { + /* VM updates are only interesting + * for other VM updates and moves. + */ + if ((owner != AMDGPU_FENCE_OWNER_MOVE) && + (fence->owner != AMDGPU_FENCE_OWNER_MOVE) && + ((owner == AMDGPU_FENCE_OWNER_VM) != + (fence->owner == AMDGPU_FENCE_OWNER_VM))) continue; + /* Ignore fence from the same owner as + * long as it isn't undefined. + */ + if (owner != AMDGPU_FENCE_OWNER_UNDEFINED && + fence->owner == owner) + continue; + } + r = amdgpu_sync_fence(adev, sync, f); if (r) break; |
