Skip to contentSkip to conversation

Patch "drm/amdgpu: save list length when fence is signaled" has been added to the 4.12-stable tree

PATCH [email protected] 1 participant 1 message Aug 18, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/amdgpu: save list length when fence is signaled

to the 4.12-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-amdgpu-save-list-length-when-fence-is-signaled.patch
and it can be found in the queue-4.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 7a7c286d07f9c704e8fd11dd960bf421cc67b66b Mon Sep 17 00:00:00 2001

From: Chunming Zhou <[email protected]>
Date: Fri, 11 Aug 2017 09:34:33 +0800
Subject: drm/amdgpu: save list length when fence is signaled
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

From: Chunming Zhou <[email protected]>

commit 7a7c286d07f9c704e8fd11dd960bf421cc67b66b upstream.

update the list first to avoid redundant checks.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +6 -7
@@ -244,6 +244,12 @@ struct dma_fence *amdgpu_sync_peek_fence
 		struct dma_fence *f = e->fence;
 		struct amd_sched_fence *s_fence = to_amd_sched_fence(f);
 
+		if (dma_fence_is_signaled(f)) {
+			hash_del(&e->node);
+			dma_fence_put(f);
+			kmem_cache_free(amdgpu_sync_slab, e);
+			continue;
+		}
 		if (ring && s_fence) {
 			/* For fences from the same ring it is sufficient
 			 * when they are scheduled.
@@ -256,13 +262,6 @@ struct dma_fence *amdgpu_sync_peek_fence
 			}
 		}
 
-		if (dma_fence_is_signaled(f)) {
-			hash_del(&e->node);
-			dma_fence_put(f);
-			kmem_cache_free(amdgpu_sync_slab, e);
-			continue;
-		}
-
 		return f;
 	}
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.12/drm-amdgpu-save-list-length-when-fence-is-signaled.patch