提交 888c9e33 编写于 作者: C Chunming Zhou 提交者: Alex Deucher

drm/amdgpu: fix lost sync_to if scheduler is enabled.

when scheduler is enabled, the semaphore isn't used at all.
Signed-off-by: NChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: NChristian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
上级 f3b5cb3e
...@@ -293,7 +293,8 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync, ...@@ -293,7 +293,8 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync,
fence = to_amdgpu_fence(sync->sync_to[i]); fence = to_amdgpu_fence(sync->sync_to[i]);
/* check if we really need to sync */ /* check if we really need to sync */
if (!amdgpu_fence_need_sync(fence, ring)) if (!amdgpu_enable_scheduler &&
!amdgpu_fence_need_sync(fence, ring))
continue; continue;
/* prevent GPU deadlocks */ /* prevent GPU deadlocks */
...@@ -303,7 +304,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync, ...@@ -303,7 +304,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync,
} }
if (amdgpu_enable_scheduler || !amdgpu_enable_semaphores) { if (amdgpu_enable_scheduler || !amdgpu_enable_semaphores) {
r = fence_wait(&fence->base, true); r = fence_wait(sync->sync_to[i], true);
if (r) if (r)
return r; return r;
continue; continue;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册