diff options
author | Christian König <christian.koenig@amd.com> | 2015-07-27 09:40:35 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-08-17 16:50:40 -0400 |
commit | 1d3897e056d2ff2bb3b17e054aa75d36adacaacc (patch) | |
tree | 967cf824e7531f9856e7f8a1bd8e9c496e45d9ed /drivers/gpu/drm/amd | |
parent | afe10081498fdf2c5b92c7fcc534e49544218fb9 (diff) |
drm/amdgpu: fix syncing to VM updates
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-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, | |||
122 | f = rcu_dereference_protected(flist->shared[i], | 122 | f = rcu_dereference_protected(flist->shared[i], |
123 | reservation_object_held(resv)); | 123 | reservation_object_held(resv)); |
124 | fence = f ? to_amdgpu_fence(f) : NULL; | 124 | fence = f ? to_amdgpu_fence(f) : NULL; |
125 | if (fence && fence->ring->adev == adev && | 125 | if (fence && fence->ring->adev == adev) { |
126 | fence->owner == owner && | 126 | /* VM updates are only interesting |
127 | fence->owner != AMDGPU_FENCE_OWNER_UNDEFINED) | 127 | * for other VM updates and moves. |
128 | */ | ||
129 | if ((owner != AMDGPU_FENCE_OWNER_MOVE) && | ||
130 | (fence->owner != AMDGPU_FENCE_OWNER_MOVE) && | ||
131 | ((owner == AMDGPU_FENCE_OWNER_VM) != | ||
132 | (fence->owner == AMDGPU_FENCE_OWNER_VM))) | ||
128 | continue; | 133 | continue; |
129 | 134 | ||
135 | /* Ignore fence from the same owner as | ||
136 | * long as it isn't undefined. | ||
137 | */ | ||
138 | if (owner != AMDGPU_FENCE_OWNER_UNDEFINED && | ||
139 | fence->owner == owner) | ||
140 | continue; | ||
141 | } | ||
142 | |||
130 | r = amdgpu_sync_fence(adev, sync, f); | 143 | r = amdgpu_sync_fence(adev, sync, f); |
131 | if (r) | 144 | if (r) |
132 | break; | 145 | break; |