diff options
author | Christian König <christian.koenig@amd.com> | 2017-11-24 05:41:52 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-06 12:48:32 -0500 |
commit | d4b7648d6d1774f961f3f6a758d9b009f1f34f05 (patch) | |
tree | fc3deff0c0454045a22a22e609e6d01adb2a7f1f /drivers | |
parent | fdb1a2236b07948e83e0a777e1795d4f07e52c33 (diff) |
drm/amdgpu: fix amdgpu_sync_resv v2
Fixes a bug introduced by AMDGPU_GEM_CREATE_EXPLICIT_SYNC. We still need
to wait for pipelined moves in the shared fences list.
v2: fix typo
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Andres Rodriguez <andresx7@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index f3d1a25b660f..ebe1ffbab0c1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | |||
@@ -194,9 +194,6 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, | |||
194 | f = reservation_object_get_excl(resv); | 194 | f = reservation_object_get_excl(resv); |
195 | r = amdgpu_sync_fence(adev, sync, f, false); | 195 | r = amdgpu_sync_fence(adev, sync, f, false); |
196 | 196 | ||
197 | if (explicit_sync) | ||
198 | return r; | ||
199 | |||
200 | flist = reservation_object_get_list(resv); | 197 | flist = reservation_object_get_list(resv); |
201 | if (!flist || r) | 198 | if (!flist || r) |
202 | return r; | 199 | return r; |
@@ -215,11 +212,11 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, | |||
215 | (fence_owner == AMDGPU_FENCE_OWNER_VM))) | 212 | (fence_owner == AMDGPU_FENCE_OWNER_VM))) |
216 | continue; | 213 | continue; |
217 | 214 | ||
218 | /* Ignore fence from the same owner as | 215 | /* Ignore fence from the same owner and explicit one as |
219 | * long as it isn't undefined. | 216 | * long as it isn't undefined. |
220 | */ | 217 | */ |
221 | if (owner != AMDGPU_FENCE_OWNER_UNDEFINED && | 218 | if (owner != AMDGPU_FENCE_OWNER_UNDEFINED && |
222 | fence_owner == owner) | 219 | (fence_owner == owner || explicit_sync)) |
223 | continue; | 220 | continue; |
224 | } | 221 | } |
225 | 222 | ||