dma-buf: add new dma_fence_chain container v7
authorChristian König <ckoenig.leichtzumerken@gmail.com>
Mon, 1 Apr 2019 09:50:55 +0000 (17:50 +0800)
committerChristian König <christian.koenig@amd.com>
Mon, 1 Apr 2019 10:05:02 +0000 (12:05 +0200)
commit7bf60c52e093d9309752dbc3569fa213a80fb815
treeb60c08e69a506f7afa76bd49238ffccdef251aed
parent64e1f830ea5b3516a4256ed1c504a265d7f2a65c
dma-buf: add new dma_fence_chain container v7

Lockless container implementation similar to a dma_fence_array, but with
only two elements per node and automatic garbage collection.

v2: properly document dma_fence_chain_for_each, add dma_fence_chain_find_seqno,
    drop prev reference during garbage collection if it's not a chain fence.
v3: use head and iterator for dma_fence_chain_for_each
v4: fix reference count in dma_fence_chain_enable_signaling
v5: fix iteration when walking each chain node
v6: add __rcu for member 'prev' of struct chain node
v7: fix rcu warnings from kernel robot

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Link: https://patchwork.freedesktop.org/patch/295778/?series=58813&rev=1
drivers/dma-buf/Makefile
drivers/dma-buf/dma-fence-chain.c [new file with mode: 0644]
include/linux/dma-fence-chain.h [new file with mode: 0644]