* [PATCH 1/2] dma-buf: Remove leftover [un]map_atomic comments
@ 2019-03-21 20:09 Andrew F. Davis
2019-03-21 20:09 ` [PATCH 2/2] dma-buf: Update [un]map documentation to match the other functions Andrew F. Davis
0 siblings, 1 reply; 2+ messages in thread
From: Andrew F. Davis @ 2019-03-21 20:09 UTC (permalink / raw)
To: Sumit Semwal; +Cc: dri-devel, linux-kernel, Andrew F . Davis
The map_atomic/unmap_atomic callbacks have been removed, remove
the related comments.
Fixes: f664a5269542 ("dma-buf: remove kmap_atomic interface")
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
include/linux/dma-buf.h | 5 -----
1 file changed, 5 deletions(-)
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index 58725f890b5b..e4a8dab2bc54 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -39,11 +39,6 @@ struct dma_buf_attachment;
/**
* struct dma_buf_ops - operations possible on struct dma_buf
- * @map_atomic: [optional] maps a page from the buffer into kernel address
- * space, users may not block until the subsequent unmap call.
- * This callback must not sleep.
- * @unmap_atomic: [optional] unmaps a atomically mapped page from the buffer.
- * This Callback must not sleep.
* @map: [optional] maps a page from the buffer into kernel address space.
* @unmap: [optional] unmaps a page from the buffer.
* @vmap: [optional] creates a virtual mapping for the buffer into kernel
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] dma-buf: Update [un]map documentation to match the other functions
2019-03-21 20:09 [PATCH 1/2] dma-buf: Remove leftover [un]map_atomic comments Andrew F. Davis
@ 2019-03-21 20:09 ` Andrew F. Davis
0 siblings, 0 replies; 2+ messages in thread
From: Andrew F. Davis @ 2019-03-21 20:09 UTC (permalink / raw)
To: Sumit Semwal; +Cc: dri-devel, linux-kernel, Andrew F . Davis
Other function have inline documentation, a couple still have
theirs at the top of the structure, update the docs and move
them inline.
Signed-off-by: Andrew F. Davis <afd@ti.com>
---
include/linux/dma-buf.h | 29 +++++++++++++++++++++++++----
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/include/linux/dma-buf.h b/include/linux/dma-buf.h
index e4a8dab2bc54..a0bd071466fc 100644
--- a/include/linux/dma-buf.h
+++ b/include/linux/dma-buf.h
@@ -39,8 +39,6 @@ struct dma_buf_attachment;
/**
* struct dma_buf_ops - operations possible on struct dma_buf
- * @map: [optional] maps a page from the buffer into kernel address space.
- * @unmap: [optional] unmaps a page from the buffer.
* @vmap: [optional] creates a virtual mapping for the buffer into kernel
* address space. Same restrictions as for vmap and friends apply.
* @vunmap: [optional] unmaps a vmap from the buffer
@@ -200,8 +198,6 @@ struct dma_buf_ops {
* to be restarted.
*/
int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction);
- void *(*map)(struct dma_buf *, unsigned long);
- void (*unmap)(struct dma_buf *, unsigned long, void *);
/**
* @mmap:
@@ -240,6 +236,31 @@ struct dma_buf_ops {
*/
int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
+ /**
+ * @map:
+ *
+ * Maps a page from the buffer into kernel address space. The page is
+ * specified by offset into the buffer in PAGE_SIZE units.
+ *
+ * This callback is optional.
+ *
+ * Returns:
+ *
+ * Virtual address pointer where requested page can be accessed. NULL
+ * on error or when this function is unimplemented by the exporter.
+ */
+ void *(*map)(struct dma_buf *, unsigned long);
+
+ /**
+ * @unmap:
+ *
+ * Unmaps a page from the buffer. Page offset and address pointer should
+ * be the same as the one passed to and returned by matching call to map.
+ *
+ * This callback is optional.
+ */
+ void (*unmap)(struct dma_buf *, unsigned long, void *);
+
void *(*vmap)(struct dma_buf *);
void (*vunmap)(struct dma_buf *, void *vaddr);
};
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-21 20:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-21 20:09 [PATCH 1/2] dma-buf: Remove leftover [un]map_atomic comments Andrew F. Davis
2019-03-21 20:09 ` [PATCH 2/2] dma-buf: Update [un]map documentation to match the other functions Andrew F. Davis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).