[PATCH v2] udmabuf: add vmap method to udmabuf_ops
Dmitry Osipenko
dmitry.osipenko at collabora.com
Sun Nov 13 16:35:20 UTC 2022
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
More information about the dri-devel
mailing list