Merge drm/drm-next into drm-misc-next
[linux.git] / drivers / dma-buf / heaps / heap-helpers.c
index d0696cf937af3476578bac4a10464e8948720545..fcf4ce3e2cbb5eba326b9ce669b697e03b8ae004 100644 (file)
@@ -235,7 +235,7 @@ static int dma_heap_dma_buf_end_cpu_access(struct dma_buf *dmabuf,
        return 0;
 }
 
-static void *dma_heap_dma_buf_vmap(struct dma_buf *dmabuf)
+static int dma_heap_dma_buf_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map)
 {
        struct heap_helper_buffer *buffer = dmabuf->priv;
        void *vaddr;
@@ -244,10 +244,14 @@ static void *dma_heap_dma_buf_vmap(struct dma_buf *dmabuf)
        vaddr = dma_heap_buffer_vmap_get(buffer);
        mutex_unlock(&buffer->lock);
 
-       return vaddr;
+       if (!vaddr)
+               return -ENOMEM;
+       dma_buf_map_set_vaddr(map, vaddr);
+
+       return 0;
 }
 
-static void dma_heap_dma_buf_vunmap(struct dma_buf *dmabuf, void *vaddr)
+static void dma_heap_dma_buf_vunmap(struct dma_buf *dmabuf, struct dma_buf_map *map)
 {
        struct heap_helper_buffer *buffer = dmabuf->priv;
 
This page took 0.032391 seconds and 4 git commands to generate.