Hi, > diff --git a/hw/display/virtio-gpu-udmabuf.c b/hw/display/virtio-gpu-udmabuf.c > index 2c0e7b2455..8bbce08550 100644 > --- a/hw/display/virtio-gpu-udmabuf.c > +++ b/hw/display/virtio-gpu-udmabuf.c > @@ -72,7 +72,10 @@ static void virtio_gpu_create_udmabuf(struct > virtio_gpu_simple_resource *res) > > static void virtio_gpu_remap_udmabuf(struct virtio_gpu_simple_resource *res) > { > - res->remapsz = res->width * res->height * 4; > + if (res->blob_size) { > + res->remapsz = res->blob_size; > + } > + > res->remapsz = QEMU_ALIGN_UP(res->remapsz, qemu_real_host_page_size); > > res->remapped = mmap(NULL, res->remapsz, PROT_READ, > @@ -152,7 +155,9 @@ void virtio_gpu_init_udmabuf(struct > virtio_gpu_simple_resource *res) > pdata = res->remapped; > } > > - (void) pdata; > + if (pdata) { > + res->blob = pdata; > + } > }
That is confusing. Patch #2 introduces code which is removed here (probably leftovers from udmabuf prototype which didn't use blob resources). I think it would be useful to merge patch #2 with this one. Also we might cleanup things a bit. Do we need separate remapsz + blob_size fields in the first place? Probably not ... take care, Gerd PS: Can you explicitly cc me on the next version of the patch series? Some patches (this one for example) are on the list only and not in my inbox. Thanks.