Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dma-buf: use inline lock for the dma-fence-chain

Using the inline lock is now the recommended way for dma_fence
implementations.

So use this approach for the framework's internal fences as well.

Also saves about 4 bytes for the external spinlock.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com>
Reviewed-by: Philipp Stanner <phasta@kernel.org>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Link: https://lore.kernel.org/r/20260219160822.1529-9-christian.koenig@amd.com

+1 -3
+1 -2
drivers/dma-buf/dma-fence-chain.c
··· 245 245 struct dma_fence_chain *prev_chain = to_dma_fence_chain(prev); 246 246 uint64_t context; 247 247 248 - spin_lock_init(&chain->lock); 249 248 rcu_assign_pointer(chain->prev, prev); 250 249 chain->fence = fence; 251 250 chain->prev_seqno = 0; ··· 260 261 seqno = max(prev->seqno, seqno); 261 262 } 262 263 263 - dma_fence_init64(&chain->base, &dma_fence_chain_ops, &chain->lock, 264 + dma_fence_init64(&chain->base, &dma_fence_chain_ops, NULL, 264 265 context, seqno); 265 266 266 267 /*
-1
include/linux/dma-fence-chain.h
··· 46 46 */ 47 47 struct irq_work work; 48 48 }; 49 - spinlock_t lock; 50 49 }; 51 50 52 51