diff options
Diffstat (limited to 'include/linux/dma-buf.h')
| -rw-r--r-- | include/linux/dma-buf.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index 3fe90d494edb..e0b0741ae671 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
| @@ -112,19 +112,24 @@ struct dma_buf_ops { | |||
| 112 | * @file: file pointer used for sharing buffers across, and for refcounting. | 112 | * @file: file pointer used for sharing buffers across, and for refcounting. |
| 113 | * @attachments: list of dma_buf_attachment that denotes all devices attached. | 113 | * @attachments: list of dma_buf_attachment that denotes all devices attached. |
| 114 | * @ops: dma_buf_ops associated with this buffer object. | 114 | * @ops: dma_buf_ops associated with this buffer object. |
| 115 | * @lock: used internally to serialize list manipulation, attach/detach and vmap/unmap | ||
| 116 | * @vmapping_counter: used internally to refcnt the vmaps | ||
| 117 | * @vmap_ptr: the current vmap ptr if vmapping_counter > 0 | ||
| 115 | * @exp_name: name of the exporter; useful for debugging. | 118 | * @exp_name: name of the exporter; useful for debugging. |
| 116 | * @owner: pointer to exporter module; used for refcounting when exporter is a | 119 | * @owner: pointer to exporter module; used for refcounting when exporter is a |
| 117 | * kernel module. | 120 | * kernel module. |
| 118 | * @list_node: node for dma_buf accounting and debugging. | 121 | * @list_node: node for dma_buf accounting and debugging. |
| 119 | * @priv: exporter specific private data for this buffer object. | 122 | * @priv: exporter specific private data for this buffer object. |
| 120 | * @resv: reservation object linked to this dma-buf | 123 | * @resv: reservation object linked to this dma-buf |
| 124 | * @poll: for userspace poll support | ||
| 125 | * @cb_excl: for userspace poll support | ||
| 126 | * @cb_shared: for userspace poll support | ||
| 121 | */ | 127 | */ |
| 122 | struct dma_buf { | 128 | struct dma_buf { |
| 123 | size_t size; | 129 | size_t size; |
| 124 | struct file *file; | 130 | struct file *file; |
| 125 | struct list_head attachments; | 131 | struct list_head attachments; |
| 126 | const struct dma_buf_ops *ops; | 132 | const struct dma_buf_ops *ops; |
| 127 | /* mutex to serialize list manipulation, attach/detach and vmap/unmap */ | ||
| 128 | struct mutex lock; | 133 | struct mutex lock; |
| 129 | unsigned vmapping_counter; | 134 | unsigned vmapping_counter; |
| 130 | void *vmap_ptr; | 135 | void *vmap_ptr; |
| @@ -188,9 +193,11 @@ struct dma_buf_export_info { | |||
| 188 | 193 | ||
| 189 | /** | 194 | /** |
| 190 | * helper macro for exporters; zeros and fills in most common values | 195 | * helper macro for exporters; zeros and fills in most common values |
| 196 | * | ||
| 197 | * @name: export-info name | ||
| 191 | */ | 198 | */ |
| 192 | #define DEFINE_DMA_BUF_EXPORT_INFO(a) \ | 199 | #define DEFINE_DMA_BUF_EXPORT_INFO(name) \ |
| 193 | struct dma_buf_export_info a = { .exp_name = KBUILD_MODNAME, \ | 200 | struct dma_buf_export_info name = { .exp_name = KBUILD_MODNAME, \ |
| 194 | .owner = THIS_MODULE } | 201 | .owner = THIS_MODULE } |
| 195 | 202 | ||
| 196 | /** | 203 | /** |
| @@ -235,6 +242,4 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *, | |||
| 235 | unsigned long); | 242 | unsigned long); |
| 236 | void *dma_buf_vmap(struct dma_buf *); | 243 | void *dma_buf_vmap(struct dma_buf *); |
| 237 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); | 244 | void dma_buf_vunmap(struct dma_buf *, void *vaddr); |
| 238 | int dma_buf_debugfs_create_file(const char *name, | ||
| 239 | int (*write)(struct seq_file *)); | ||
| 240 | #endif /* __DMA_BUF_H__ */ | 245 | #endif /* __DMA_BUF_H__ */ |
