aboutsummaryrefslogtreecommitdiff
path: root/include/linux/dma-heap.h
AgeCommit message (Collapse)AuthorFilesLines
2024-07-23dma-buf: heaps: Deduplicate docs and adopt common formatT.J. Mercier1-20/+1
The docs for dma_heap_get_name were incorrect, and since they were duplicated in the header they were wrong there too. The docs formatting was inconsistent so I tried to make it more consistent across functions since I'm already in here doing cleanup. Remove multiple unused includes and alphabetize. Signed-off-by: T.J. Mercier <[email protected]> Signed-off-by: Yong Wu <[email protected]> [Yong: Just add a comment for "priv" to mute build warning] Signed-off-by: Yunfei Dong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Christian König <[email protected]>
2024-06-19dma-buf/heaps: Correct the types of fd_flags and heap_flagsBarry Song1-2/+2
dma_heap_allocation_data defines the UAPI as follows: struct dma_heap_allocation_data { __u64 len; __u32 fd; __u32 fd_flags; __u64 heap_flags; }; But dma heaps are casting both fd_flags and heap_flags into unsigned long. This patch makes dma heaps - cma heap and system heap have consistent types with UAPI. Signed-off-by: Barry Song <[email protected]> Acked-by: John Stultz <[email protected]> Reviewed-by: Carlos Llamas <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2021-02-25dma-buf: dma-heap: Provide accessor to get heap nameJohn Stultz1-0/+9
It can be useful to access the name for the heap, so provide an accessor to do so. Cc: Daniel Vetter <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Chris Goldsworthy <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Sandeep Patil <[email protected]> Cc: Daniel Mentz <[email protected]> Cc: Ørjan Eide <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Ezequiel Garcia <[email protected]> Cc: Simon Ser <[email protected]> Cc: James Jones <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: John Stultz <[email protected]> Acked-by: Daniel Vetter <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2021-01-22dma-buf: heaps: Rework heap allocation hooks to return struct dma_buf ↵John Stultz1-6/+6
instead of fd Every heap needs to create a dmabuf and then export it to a fd via dma_buf_fd(), so to consolidate things a bit, have the heaps just return a struct dmabuf * and let the top level dma_heap_buffer_alloc() call handle creating the fd via dma_buf_fd(). Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Laura Abbott <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Sandeep Patil <[email protected]> Cc: Daniel Mentz <[email protected]> Cc: Chris Goldsworthy <[email protected]> Cc: Ørjan Eide <[email protected]> Cc: Robin Murphy <[email protected]> Cc: Ezequiel Garcia <[email protected]> Cc: Simon Ser <[email protected]> Cc: James Jones <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> [sumits: minor reword of commit message] Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-12-11dma-buf: Add dma-buf heaps frameworkAndrew F. Davis1-0/+59
This framework allows a unified userspace interface for dma-buf exporters, allowing userland to allocate specific types of memory for use in dma-buf sharing. Each heap is given its own device node, which a user can allocate a dma-buf fd from using the DMA_HEAP_IOC_ALLOC. This code is an evoluiton of the Android ION implementation, and a big thanks is due to its authors/maintainers over time for their effort: Rebecca Schultz Zavin, Colin Cross, Benjamin Gaignard, Laura Abbott, and many other contributors! Cc: Laura Abbott <[email protected]> Cc: Benjamin Gaignard <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Pratik Patel <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Vincent Donnefort <[email protected]> Cc: Sudipto Paul <[email protected]> Cc: Andrew F. Davis <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Chenbo Feng <[email protected]> Cc: Alistair Strachan <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Sandeep Patil <[email protected]> Cc: Hillf Danton <[email protected]> Cc: Dave Airlie <[email protected]> Cc: [email protected] Reviewed-by: Brian Starkey <[email protected]> Acked-by: Sandeep Patil <[email protected]> Signed-off-by: Andrew F. Davis <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-30Revert "dma-buf: Add dma-buf heaps framework"Sean Paul1-59/+0
This reverts commit a69b0e855d3fd278ff6f09a23e1edf929538e304. This patchset doesn't meet the UAPI requirements set out in [1] for the DRM subsystem. Once the userspace component is reviewed and ready for merge we can try again. [1]- https://01.org/linuxgraphics/gfx-docs/drm/gpu/drm-uapi.html#open-source-userspace-requirements Fixes: a69b0e855d3f ("dma-buf: Add dma-buf heaps framework") Cc: Laura Abbott <[email protected]> Cc: Benjamin Gaignard <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Pratik Patel <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Vincent Donnefort <[email protected]> Cc: Sudipto Paul <[email protected]> Cc: Andrew F. Davis <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Chenbo Feng <[email protected]> Cc: Alistair Strachan <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Hillf Danton <[email protected]> Cc: [email protected] Cc: Brian Starkey <[email protected]> Cc: John Stultz <[email protected]> Cc: Mauro Carvalho Chehab <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Rob Herring <[email protected]> Cc: Jonathan Cameron <[email protected]> Cc: "Paul E. McKenney" <[email protected]> Cc: Sean Paul <[email protected]> Cc: "Andrew F. Davis" <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: David Airlie <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2019-10-25dma-buf: Add dma-buf heaps frameworkAndrew F. Davis1-0/+59
This framework allows a unified userspace interface for dma-buf exporters, allowing userland to allocate specific types of memory for use in dma-buf sharing. Each heap is given its own device node, which a user can allocate a dma-buf fd from using the DMA_HEAP_IOC_ALLOC. This code is an evoluiton of the Android ION implementation, and a big thanks is due to its authors/maintainers over time for their effort: Rebecca Schultz Zavin, Colin Cross, Benjamin Gaignard, Laura Abbott, and many other contributors! Cc: Laura Abbott <[email protected]> Cc: Benjamin Gaignard <[email protected]> Cc: Sumit Semwal <[email protected]> Cc: Liam Mark <[email protected]> Cc: Pratik Patel <[email protected]> Cc: Brian Starkey <[email protected]> Cc: Vincent Donnefort <[email protected]> Cc: Sudipto Paul <[email protected]> Cc: Andrew F. Davis <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Chenbo Feng <[email protected]> Cc: Alistair Strachan <[email protected]> Cc: Hridya Valsaraju <[email protected]> Cc: Hillf Danton <[email protected]> Cc: [email protected] Reviewed-by: Benjamin Gaignard <[email protected]> Reviewed-by: Brian Starkey <[email protected]> Acked-by: Laura Abbott <[email protected]> Tested-by: Ayan Kumar Halder <[email protected]> Signed-off-by: Andrew F. Davis <[email protected]> Signed-off-by: John Stultz <[email protected]> Signed-off-by: Sumit Semwal <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]