diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-07-01 06:57:26 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-08 16:03:20 -0400 |
commit | 3aac4502fd3f80dcf7e65dbf6edd8676893c1f46 (patch) | |
tree | 16d7554b57ed1b2a63f7d80d67acee5c8b3ab92c /include/linux/dma-buf.h | |
parent | 606b23ad609c71cfb37eeb972ea4c901034edd3c (diff) |
dma-buf: use reservation objects
This allows reservation objects to be used in dma-buf. it's required
for implementing polling support on the fences that belong to a dma-buf.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com> #drivers/media/v4l2-core/
Acked-by: Thomas Hellstrom <thellstrom@vmware.com> #drivers/gpu/drm/ttm
Acked-by: Sumit Semwal <sumit.semwal@linaro.org>
Acked-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> #drivers/gpu/drm/armada/
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/dma-buf.h')
-rw-r--r-- | include/linux/dma-buf.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h index f886985a28b2..fd7def2e0ae2 100644 --- a/include/linux/dma-buf.h +++ b/include/linux/dma-buf.h | |||
@@ -115,6 +115,7 @@ struct dma_buf_ops { | |||
115 | * @exp_name: name of the exporter; useful for debugging. | 115 | * @exp_name: name of the exporter; useful for debugging. |
116 | * @list_node: node for dma_buf accounting and debugging. | 116 | * @list_node: node for dma_buf accounting and debugging. |
117 | * @priv: exporter specific private data for this buffer object. | 117 | * @priv: exporter specific private data for this buffer object. |
118 | * @resv: reservation object linked to this dma-buf | ||
118 | */ | 119 | */ |
119 | struct dma_buf { | 120 | struct dma_buf { |
120 | size_t size; | 121 | size_t size; |
@@ -128,6 +129,7 @@ struct dma_buf { | |||
128 | const char *exp_name; | 129 | const char *exp_name; |
129 | struct list_head list_node; | 130 | struct list_head list_node; |
130 | void *priv; | 131 | void *priv; |
132 | struct reservation_object *resv; | ||
131 | }; | 133 | }; |
132 | 134 | ||
133 | /** | 135 | /** |
@@ -168,10 +170,11 @@ void dma_buf_detach(struct dma_buf *dmabuf, | |||
168 | struct dma_buf_attachment *dmabuf_attach); | 170 | struct dma_buf_attachment *dmabuf_attach); |
169 | 171 | ||
170 | struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, | 172 | struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops, |
171 | size_t size, int flags, const char *); | 173 | size_t size, int flags, const char *, |
174 | struct reservation_object *); | ||
172 | 175 | ||
173 | #define dma_buf_export(priv, ops, size, flags) \ | 176 | #define dma_buf_export(priv, ops, size, flags, resv) \ |
174 | dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME) | 177 | dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME, resv) |
175 | 178 | ||
176 | int dma_buf_fd(struct dma_buf *dmabuf, int flags); | 179 | int dma_buf_fd(struct dma_buf *dmabuf, int flags); |
177 | struct dma_buf *dma_buf_get(int fd); | 180 | struct dma_buf *dma_buf_get(int fd); |