]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - include/linux/dma-buf.h
Merge tag 'drm-next-2020-06-02' of git://anongit.freedesktop.org/drm/drm
[thirdparty/linux.git] / include / linux / dma-buf.h
index 57bcef6f988a2d237f8e986bc9cefd01c639340d..ab0c156abee6e95e1f37b526467e2efd012c5b5a 100644 (file)
@@ -333,6 +333,14 @@ struct dma_buf {
  * Attachment operations implemented by the importer.
  */
 struct dma_buf_attach_ops {
+       /**
+        * @allow_peer2peer:
+        *
+        * If this is set to true the importer must be able to handle peer
+        * resources without struct pages.
+        */
+       bool allow_peer2peer;
+
        /**
         * @move_notify: [optional] notification that the DMA-buf is moving
         *
@@ -361,6 +369,7 @@ struct dma_buf_attach_ops {
  * @node: list of dma_buf_attachment, protected by dma_resv lock of the dmabuf.
  * @sgt: cached mapping.
  * @dir: direction of cached mapping.
+ * @peer2peer: true if the importer can handle peer resources without pages.
  * @priv: exporter specific attachment data.
  * @importer_ops: importer operations for this attachment, if provided
  * dma_buf_map/unmap_attachment() must be called with the dma_resv lock held.
@@ -381,6 +390,7 @@ struct dma_buf_attachment {
        struct list_head node;
        struct sg_table *sgt;
        enum dma_data_direction dir;
+       bool peer2peer;
        const struct dma_buf_attach_ops *importer_ops;
        void *importer_priv;
        void *priv;