mirror of
https://github.com/torvalds/linux.git
synced 2026-05-29 17:43:52 +02:00
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
This commit is contained in:
parent
5943243914
commit
a408c0ca0c
|
|
@ -245,7 +245,6 @@ void dma_fence_chain_init(struct dma_fence_chain *chain,
|
||||||
struct dma_fence_chain *prev_chain = to_dma_fence_chain(prev);
|
struct dma_fence_chain *prev_chain = to_dma_fence_chain(prev);
|
||||||
uint64_t context;
|
uint64_t context;
|
||||||
|
|
||||||
spin_lock_init(&chain->lock);
|
|
||||||
rcu_assign_pointer(chain->prev, prev);
|
rcu_assign_pointer(chain->prev, prev);
|
||||||
chain->fence = fence;
|
chain->fence = fence;
|
||||||
chain->prev_seqno = 0;
|
chain->prev_seqno = 0;
|
||||||
|
|
@ -261,7 +260,7 @@ void dma_fence_chain_init(struct dma_fence_chain *chain,
|
||||||
seqno = max(prev->seqno, seqno);
|
seqno = max(prev->seqno, seqno);
|
||||||
}
|
}
|
||||||
|
|
||||||
dma_fence_init64(&chain->base, &dma_fence_chain_ops, &chain->lock,
|
dma_fence_init64(&chain->base, &dma_fence_chain_ops, NULL,
|
||||||
context, seqno);
|
context, seqno);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,6 @@ struct dma_fence_chain {
|
||||||
*/
|
*/
|
||||||
struct irq_work work;
|
struct irq_work work;
|
||||||
};
|
};
|
||||||
spinlock_t lock;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user