mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
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>
This commit is contained in:
parent
606b23ad60
commit
3aac4502fd
17 changed files with 65 additions and 14 deletions
|
@ -115,6 +115,7 @@ struct dma_buf_ops {
|
|||
* @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.
|
||||
* @resv: reservation object linked to this dma-buf
|
||||
*/
|
||||
struct dma_buf {
|
||||
size_t size;
|
||||
|
@ -128,6 +129,7 @@ struct dma_buf {
|
|||
const char *exp_name;
|
||||
struct list_head list_node;
|
||||
void *priv;
|
||||
struct reservation_object *resv;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -168,10 +170,11 @@ void dma_buf_detach(struct dma_buf *dmabuf,
|
|||
struct dma_buf_attachment *dmabuf_attach);
|
||||
|
||||
struct dma_buf *dma_buf_export_named(void *priv, const struct dma_buf_ops *ops,
|
||||
size_t size, int flags, const char *);
|
||||
size_t size, int flags, const char *,
|
||||
struct reservation_object *);
|
||||
|
||||
#define dma_buf_export(priv, ops, size, flags) \
|
||||
dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME)
|
||||
#define dma_buf_export(priv, ops, size, flags, resv) \
|
||||
dma_buf_export_named(priv, ops, size, flags, KBUILD_MODNAME, resv)
|
||||
|
||||
int dma_buf_fd(struct dma_buf *dmabuf, int flags);
|
||||
struct dma_buf *dma_buf_get(int fd);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue