Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 888c9e33 authored by Chunming Zhou's avatar Chunming Zhou Committed by Alex Deucher
Browse files

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



when scheduler is enabled, the semaphore isn't used at all.

Signed-off-by: default avatarChunming Zhou <David1.Zhou@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Cc: stable@vger.kernel.org
parent f3b5cb3e
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -293,7 +293,8 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync,
		fence = to_amdgpu_fence(sync->sync_to[i]);

		/* 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;

		/* prevent GPU deadlocks */
@@ -303,7 +304,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync,
		}

		if (amdgpu_enable_scheduler || !amdgpu_enable_semaphores) {
			r = fence_wait(&fence->base, true);
			r = fence_wait(sync->sync_to[i], true);
			if (r)
				return r;
			continue;