Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH 1/2] dma-buf/sync-file: fix logic error in new fence merge code
@ 2022-03-29  7:00 Christian König
  2022-03-29  7:00 ` [Intel-gfx] [PATCH 2/2] dma-buf: handle empty dma_fence_arrays gracefully Christian König
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Christian König @ 2022-03-29  7:00 UTC (permalink / raw)
  To: intel-gfx, dri-devel, linux-media, linaro-mm-sig, ville.syrjala,
	daniel
  Cc: Christian König

When the array is empty because everything is signaled we can't use
add_fence() to add something because that would filter the signaled
fence again.

Signed-off-by: Christian König <christian.koenig@amd.com>
Fixes: 519f490db07e ("dma-buf/sync-file: fix warning about fence containers")
---
 drivers/dma-buf/sync_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
index b8dea4ec123b..514d213261df 100644
--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -262,7 +262,7 @@ static struct sync_file *sync_file_merge(const char *name, struct sync_file *a,
 	}
 
 	if (index == 0)
-		add_fence(fences, &index, dma_fence_get_stub());
+		fences[index++] = dma_fence_get_stub();
 
 	if (num_fences > index) {
 		struct dma_fence **tmp;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-03-29 13:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-29  7:00 [Intel-gfx] [PATCH 1/2] dma-buf/sync-file: fix logic error in new fence merge code Christian König
2022-03-29  7:00 ` [Intel-gfx] [PATCH 2/2] dma-buf: handle empty dma_fence_arrays gracefully Christian König
2022-03-29  8:48   ` Daniel Vetter
2022-03-29  8:49     ` Daniel Vetter
2022-03-29  7:07 ` [Intel-gfx] [Linaro-mm-sig] [PATCH 1/2] dma-buf/sync-file: fix logic error in new fence merge code Thomas Hellström
2022-03-29  8:46 ` [Intel-gfx] " Daniel Vetter
2022-03-29  8:49   ` Christian König
2022-03-29  8:55 ` Das, Nirmoy
2022-03-29 13:10 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox