summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSumit Semwal <sumit.semwal@linaro.org>2013-04-04 11:44:37 +0530
committerSumit Semwal <sumit.semwal@linaro.org>2013-05-01 16:36:22 +0530
commitb89e35636bc75b72d15a1af6d49798802aff77d5 (patch)
tree68b8531d44591f4448d09145407e490c2b5d2faf /include
parent78df969550e7187f4dcd70b737217dcbc8e9a06a (diff)
dma-buf: Add debugfs support
Add debugfs support to make it easier to print debug information about the dma-buf buffers. Cc: Dave Airlie <airlied@redhat.com> [minor fixes on init and warning fix] Cc: Dan Carpenter <dan.carpenter@oracle.com> [remove double unlock in fail case] Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dma-buf.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 6f55c0424f12..dfac5ed31120 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -113,6 +113,7 @@ struct dma_buf_ops {
* @attachments: list of dma_buf_attachment that denotes all devices attached.
* @ops: dma_buf_ops associated with this buffer object.
* @exp_name: name of the exporter; useful for debugging.
+ * @list_node: node for dma_buf accounting and debugging.
* @priv: exporter specific private data for this buffer object.
*/
struct dma_buf {
@@ -125,6 +126,7 @@ struct dma_buf {
unsigned vmapping_counter;
void *vmap_ptr;
const char *exp_name;
+ struct list_head list_node;
void *priv;
};
@@ -192,5 +194,6 @@ int dma_buf_mmap(struct dma_buf *, struct vm_area_struct *,
unsigned long);
void *dma_buf_vmap(struct dma_buf *);
void dma_buf_vunmap(struct dma_buf *, void *vaddr);
-
+int dma_buf_debugfs_create_file(const char *name,
+ int (*write)(struct seq_file *));
#endif /* __DMA_BUF_H__ */