ANDROID: fix up merge issues with dma buffer changes in cma_heap.c

Because of 20e76f1a70 ("dma-buf: Use struct dma_buf_map in
dma_buf_vunmap() interfaces") and 6619ccf1bb ("dma-buf: Use struct
dma_buf_map in dma_buf_vmap() interfaces"), the vmap and vunmap callback
functions changed.  Fix up the cma_heap.c code to reflect these changes.

Fixes: b61614ec31 ("dma-buf: heaps: Add CMA heap to dmabuf heaps")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I14e8d404a945db3b63f78a811f23928ecb316c2c
This commit is contained in:
Greg Kroah-Hartman
2020-12-15 12:37:06 +01:00
parent 6c49e685e2
commit c48541cee1

View File

@@ -199,7 +199,7 @@ static void *cma_heap_do_vmap(struct cma_heap_buffer *buffer)
return vaddr;
}
static void *cma_heap_vmap(struct dma_buf *dmabuf)
static int cma_heap_vmap(struct dma_buf *dmabuf, struct dma_buf_map *map)
{
struct cma_heap_buffer *buffer = dmabuf->priv;
void *vaddr;
@@ -212,18 +212,21 @@ static void *cma_heap_vmap(struct dma_buf *dmabuf)
}
vaddr = cma_heap_do_vmap(buffer);
if (IS_ERR(vaddr))
goto out;
if (IS_ERR(vaddr)) {
mutex_unlock(&buffer->lock);
return PTR_ERR(vaddr);
}
buffer->vaddr = vaddr;
buffer->vmap_cnt++;
out:
mutex_unlock(&buffer->lock);
return vaddr;
dma_buf_map_set_vaddr(map, vaddr);
return 0;
}
static void cma_heap_vunmap(struct dma_buf *dmabuf, void *vaddr)
static void cma_heap_vunmap(struct dma_buf *dmabuf, struct dma_buf_map *map)
{
struct cma_heap_buffer *buffer = dmabuf->priv;