Re: [PATCHv2 8/8] videobuf2: handle non-contiguous DMA allocations
From: Sergey Senozhatsky <senozhatsky@chromium.org>
Date: 2021-06-17 07:57:06
Also in:
lkml
From: Sergey Senozhatsky <senozhatsky@chromium.org>
Date: 2021-06-17 07:57:06
Also in:
lkml
On (21/06/03 13:59), Hans Verkuil wrote:
quoted
+static void __vb2_dc_put(struct vb2_dc_buf *buf) +{ + if (buf->coherent_mem) { + dma_free_attrs(buf->dev, buf->size, buf->cookie, + buf->dma_addr, buf->attrs); + return; + } + + if (buf->vaddr) + dma_vunmap_noncontiguous(buf->dev, buf->vaddr); + dma_free_noncontiguous(buf->dev, buf->size, + buf->dma_sgt, buf->dma_addr); +}Is there a reason for creating __vb2_dc_put()? I found it more a hindrance when reviewing than an advantage. I prefer to have it moved to vb2_dc_put, that way all the clean up happens in that single function.
Done.