Re: [PATCH v3 03/20] virtio-gpu: Add udmabuf helpers

2021-05-11 Thread Gerd Hoffmann
Hi, > +void virtio_gpu_fini_udmabuf(struct virtio_gpu_simple_resource *res) > +{ > +uint32_t size = res->width * res->height * 4; Hmm, no. We'll go use udmabufs for blob resources only, so this should not be needed. Maybe squash this with patch #8? take care, Gerd

[PATCH v3 03/20] virtio-gpu: Add udmabuf helpers

2021-05-11 Thread Vivek Kasireddy
Add helper functions to create a dmabuf for a resource and mmap it. To be able to create a dmabuf using the udmabuf driver, Qemu needs to be lauched with the memfd memory backend like this: qemu-system-x86_64 -m 8192m -object memory-backend-memfd,id=mem1,size=8192M -machine memory-backend=mem1 Ba