Messages in this thread | | | Date | Thu, 17 Jun 2021 16:56:58 +0900 | From | Sergey Senozhatsky <> | Subject | Re: [PATCHv2 8/8] videobuf2: handle non-contiguous DMA allocations |
| |
On (21/06/03 13:59), Hans Verkuil wrote: > > > > +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.
| |