Re: [PATCH v2] udmabuf: add vmap method to udmabuf_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Nov 13, 2022 at 07:35:20PM +0300, Dmitry Osipenko wrote:
> On 11/13/22 18:05, Lukasz Wiecaszek wrote:
> > +static int vmap_udmabuf(struct dma_buf *buf, struct iosys_map *map)
> > +{
> > +	struct udmabuf *ubuf = buf->priv;
> > +
> > +	if (!ubuf->vaddr) {
> > +		ubuf->vaddr = vm_map_ram(ubuf->pages, ubuf->pagecount, -1);
> > +		if (!ubuf->vaddr)
> > +			return -EINVAL;
> > +	}
> 
> Create a new mapping on each vmap_udmabuf() and add the corresponding
> vunmap.
> 
> Otherwise persistent vmapping shall be released together with udmabuf.
> It doesn't look that persistent vmapping is needed for udmabufs.
> 
> -- 
> Best regards,
> Dmitry

Right. Thanks for review and remarks. Adding vunmap sounds reasonable to
me. Will add it somehow this week.

Regards,
Lukasz




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux