Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1347301 > unrolled thread

[PATCH 4.4 174/342] drm/amdgpu: fix lost sync_to if scheduler is enabled.

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-03-02 01:40 +0100
Last post2016-03-02 01:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.4 174/342] drm/amdgpu: fix lost sync_to if scheduler is enabled. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-03-02 01:40 +0100

#1347301 — [PATCH 4.4 174/342] drm/amdgpu: fix lost sync_to if scheduler is enabled.

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-03-02 01:40 +0100
Subject[PATCH 4.4 174/342] drm/amdgpu: fix lost sync_to if scheduler is enabled.
Message-ID<r82ZC-8hp-59@gated-at.bofh.it>
4.4-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Chunming Zhou <David1.Zhou@amd.com>

commit 888c9e33e4c5a503285921046c621f7c73199d2f upstream.

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

Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
@@ -293,7 +293,8 @@ int amdgpu_sync_rings(struct amdgpu_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
 		}
 
 		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;

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web