staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap
diff mbox series

Message ID 1517327258-26961-1-git-send-email-alexey.skidanov@intel.com
State New, archived
Headers show
Series
  • staging: android: ion: Add implementation of dma_buf_vmap and dma_buf_vunmap
Related show

Commit Message

Skidanov, Alexey Jan. 30, 2018, 3:47 p.m. UTC
Signed-off-by: Alexey Skidanov <alexey.skidanov@intel.com>
---
 drivers/staging/android/ion/ion.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

Comments

Greg Kroah-Hartman Jan. 30, 2018, 4:48 p.m. UTC | #1
On Tue, Jan 30, 2018 at 05:47:38PM +0200, Alexey Skidanov wrote:
> Signed-off-by: Alexey Skidanov <alexey.skidanov@intel.com>
> ---

I can't take patches without any changelog text at all, sorry :(

Please fix up and describe _why_ you are making this change.

thanks,

greg k-h

Patch
diff mbox series

diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index f480885..4f1dc7f 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -327,6 +327,17 @@  static void ion_dma_buf_kunmap(struct dma_buf *dmabuf, unsigned long offset,
 {
 }
 
+static void *ion_dma_buf_vmap(struct dma_buf *dmabuf)
+{
+	struct ion_buffer *buffer = dmabuf->priv;
+
+	return buffer->vaddr;
+}
+
+static void ion_dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
+{
+}
+
 static int ion_dma_buf_begin_cpu_access(struct dma_buf *dmabuf,
 					enum dma_data_direction direction)
 {
@@ -388,6 +399,8 @@  static const struct dma_buf_ops dma_buf_ops = {
 	.unmap_atomic = ion_dma_buf_kunmap,
 	.map = ion_dma_buf_kmap,
 	.unmap = ion_dma_buf_kunmap,
+	.vmap = ion_dma_buf_vmap,
+	.vunmap = ion_dma_buf_vunmap
 };
 
 int ion_alloc(size_t len, unsigned int heap_id_mask, unsigned int flags)