mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 13:34:10 +08:00
dma-buf: Warn about dma_fence_chain container rules v2
Chaining of dma_fence_chain objects is only allowed through the prev fence and not through the contained fence. Warn about that when we create a dma_fence_chain. v2: fix comment style Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220204100429.2049-4-christian.koenig@amd.com
This commit is contained in:
parent
0fd9803b98
commit
270b48bb8d
@ -254,5 +254,14 @@ void dma_fence_chain_init(struct dma_fence_chain *chain,
|
||||
|
||||
dma_fence_init(&chain->base, &dma_fence_chain_ops,
|
||||
&chain->lock, context, seqno);
|
||||
|
||||
/*
|
||||
* Chaining dma_fence_chain container together is only allowed through
|
||||
* the prev fence and not through the contained fence.
|
||||
*
|
||||
* The correct way of handling this is to flatten out the fence
|
||||
* structure into a dma_fence_array by the caller instead.
|
||||
*/
|
||||
WARN_ON(dma_fence_is_chain(fence));
|
||||
}
|
||||
EXPORT_SYMBOL(dma_fence_chain_init);
|
||||
|
Loading…
Reference in New Issue
Block a user