diff options
Diffstat (limited to 'drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c')
-rw-r--r-- | drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c b/drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c index f2f126f4fcf6..2e4a9dd73dd5 100644 --- a/drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c +++ b/drivers/staging/media/sunxi/cedar/ion/ion_cma_heap.c @@ -81,6 +81,9 @@ static int ion_cma_allocate(struct ion_heap *heap, struct ion_buffer *buffer, buffer->priv_virt = info; buffer->sg_table = info->table; dev_dbg(dev, "Allocate buffer %p\n", buffer); + + printk(KERN_ERR "ion-cma-alloc: buffer %#x size %#x\n", info->handle, len); + return 0; free_table: @@ -98,6 +101,8 @@ static void ion_cma_free(struct ion_buffer *buffer) struct device *dev = cma_heap->dev; struct ion_cma_buffer_info *info = buffer->priv_virt; + printk(KERN_ERR "ion-cma-free: buffer %#x\n", info->handle); + dev_dbg(dev, "Release buffer %p\n", buffer); /* release memory */ dma_free_coherent(dev, buffer->size, info->cpu_addr, info->handle); @@ -120,7 +125,9 @@ static int ion_cma_mmap(struct ion_heap *mapper, struct ion_buffer *buffer, vma->vm_end - vma->vm_start, vma->vm_page_prot); } - + + printk(KERN_ERR "ion-cma-mmap: buffer %#x to %#x\n", info->handle, vma->vm_start); + return dma_mmap_coherent(dev, vma, info->cpu_addr, info->handle, buffer->size); } |