linux/drivers/dma-buf
Christian König bb42df4662 dma-buf: add dynamic DMA-buf handling v15
On the exporter side we add optional explicit pinning callbacks. Which are
called when the importer doesn't implement dynamic handling, move notification
or need the DMA-buf locked in place for its use case.

On the importer side we add an optional move_notify callback. This callback is
used by the exporter to inform the importers that their mappings should be
destroyed as soon as possible.

This allows the exporter to provide the mappings without the need to pin
the backing store.

v2: don't try to invalidate mappings when the callback is NULL,
    lock the reservation obj while using the attachments,
    add helper to set the callback
v3: move flag for invalidation support into the DMA-buf,
    use new attach_info structure to set the callback
v4: use importer_priv field instead of mangling exporter priv.
v5: drop invalidation_supported flag
v6: squash together with pin/unpin changes
v7: pin/unpin takes an attachment now
v8: nuke dma_buf_attachment_(map|unmap)_locked,
    everything is now handled backward compatible
v9: always cache when export/importer don't agree on dynamic handling
v10: minimal style cleanup
v11: drop automatically re-entry avoidance
v12: rename callback to move_notify
v13: add might_lock in appropriate places
v14: rebase on separated locking change
v15: add EXPERIMENTAL flag, some more code comments

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/353993/?series=73646&rev=1
2020-02-27 14:58:00 +01:00
..
heaps dma-buf: heaps: Remove redundant heap identifier from system heap name 2019-12-17 21:37:40 +05:30
dma-buf.c dma-buf: add dynamic DMA-buf handling v15 2020-02-27 14:58:00 +01:00
dma-fence-array.c
dma-fence-chain.c
dma-fence.c
dma-heap.c dma-heap: Make the symbol 'dma_heap_ioctl_cmds' static 2019-12-18 00:41:29 +05:30
dma-resv.c dma-resv: Also prime acquire ctx for lockdep 2019-11-21 11:03:31 +01:00
Kconfig dma-buf: add dynamic DMA-buf handling v15 2020-02-27 14:58:00 +01:00
Makefile dma-buf: heaps: Add heap helpers 2019-12-11 11:13:35 +05:30
selftest.c
selftest.h
selftests.h
seqno-fence.c
st-dma-fence.c
sw_sync.c compat_ioctl: move more drivers to compat_ptr_ioctl 2019-10-23 17:23:44 +02:00
sync_debug.c
sync_debug.h
sync_file.c - A fix for a memory leak in the dma-buf support 2019-12-09 17:13:19 +10:00
sync_trace.h
udmabuf.c udmabuf: fix dma-buf cpu access 2019-12-18 09:11:38 +01:00