~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/dma-heap.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*
  3  * DMABUF Heaps Allocation Infrastructure
  4  *
  5  * Copyright (C) 2011 Google, Inc.
  6  * Copyright (C) 2019 Linaro Ltd.
  7  */
  8 
  9 #ifndef _DMA_HEAPS_H
 10 #define _DMA_HEAPS_H
 11 
 12 #include <linux/cdev.h>
 13 #include <linux/types.h>
 14 
 15 struct dma_heap;
 16 
 17 /**
 18  * struct dma_heap_ops - ops to operate on a given heap
 19  * @allocate:           allocate dmabuf and return struct dma_buf ptr
 20  *
 21  * allocate returns dmabuf on success, ERR_PTR(-errno) on error.
 22  */
 23 struct dma_heap_ops {
 24         struct dma_buf *(*allocate)(struct dma_heap *heap,
 25                                     unsigned long len,
 26                                     u32 fd_flags,
 27                                     u64 heap_flags);
 28 };
 29 
 30 /**
 31  * struct dma_heap_export_info - information needed to export a new dmabuf heap
 32  * @name:       used for debugging/device-node name
 33  * @ops:        ops struct for this heap
 34  * @priv:       heap exporter private data
 35  *
 36  * Information needed to export a new dmabuf heap.
 37  */
 38 struct dma_heap_export_info {
 39         const char *name;
 40         const struct dma_heap_ops *ops;
 41         void *priv;
 42 };
 43 
 44 /**
 45  * dma_heap_get_drvdata() - get per-heap driver data
 46  * @heap: DMA-Heap to retrieve private data for
 47  *
 48  * Returns:
 49  * The per-heap data for the heap.
 50  */
 51 void *dma_heap_get_drvdata(struct dma_heap *heap);
 52 
 53 /**
 54  * dma_heap_get_name() - get heap name
 55  * @heap: DMA-Heap to retrieve private data for
 56  *
 57  * Returns:
 58  * The char* for the heap name.
 59  */
 60 const char *dma_heap_get_name(struct dma_heap *heap);
 61 
 62 /**
 63  * dma_heap_add - adds a heap to dmabuf heaps
 64  * @exp_info:           information needed to register this heap
 65  */
 66 struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info);
 67 
 68 #endif /* _DMA_HEAPS_H */
 69 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php