virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties

Replace 'width' and 'height' in QemuDmaBuf with 'backing_widht'
and 'backing_height' as these commonly indicate the size of the
whole surface (e.g. guest's Xorg extended display). Then use
'width' and 'height' for sub region in there (e.g. guest's
scanouts).

Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Marc-André Lureau <marcandre.lureau@redhat.com>
Cc: Vivek Kasireddy <vivek.kasireddy@intel.com>
Signed-off-by: Dongwon Kim <dongwon.kim@intel.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-ID: <20230713040444.32267-1-dongwon.kim@intel.com>
This commit is contained in:
Dongwon Kim 2023-07-12 21:04:44 -07:00 committed by Marc-André Lureau
parent 0d0be87659
commit 9ac06df8b6
6 changed files with 26 additions and 23 deletions

View file

@ -181,13 +181,13 @@ static VGPUDMABuf
}
dmabuf = g_new0(VGPUDMABuf, 1);
dmabuf->buf.width = fb->width;
dmabuf->buf.height = fb->height;
dmabuf->buf.width = r->width;
dmabuf->buf.height = r->height;
dmabuf->buf.stride = fb->stride;
dmabuf->buf.x = r->x;
dmabuf->buf.y = r->y;
dmabuf->buf.scanout_width = r->width;
dmabuf->buf.scanout_height = r->height;
dmabuf->buf.backing_width = fb->width;
dmabuf->buf.backing_height = fb->height;
dmabuf->buf.fourcc = qemu_pixman_to_drm_format(fb->format);
dmabuf->buf.fd = res->dmabuf_fd;
dmabuf->buf.allow_fences = true;
@ -218,8 +218,8 @@ int virtio_gpu_update_dmabuf(VirtIOGPU *g,
g->dmabuf.primary[scanout_id] = new_primary;
qemu_console_resize(scanout->con,
new_primary->buf.scanout_width,
new_primary->buf.scanout_height);
new_primary->buf.width,
new_primary->buf.height);
dpy_gl_scanout_dmabuf(scanout->con, &new_primary->buf);
if (old_primary) {