From: Alex Williamson Date: Wed, 16 Aug 2023 21:55:49 +0000 (-0600) Subject: vfio/display: Fix missing update to set backing fields X-Git-Tag: v8.1.2~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0f1d63d8241e7b28afcb3b705b17f6df29888116;p=thirdparty%2Fqemu.git vfio/display: Fix missing update to set backing fields The below referenced commit renames scanout_width/height to backing_width/height, but also promotes these fields in various portions of the egl interface. Meanwhile vfio dmabuf support has never used the previous scanout fields and is therefore missed in the update. This results in a black screen when transitioning from ramfb to dmabuf display when using Intel vGPU with these features. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1891 Link: https://lists.gnu.org/archive/html/qemu-devel/2023-08/msg02726.html Fixes: 9ac06df8b684 ("virtio-gpu-udmabuf: correct naming of QemuDmaBuf size properties") Signed-off-by: Alex Williamson Tested-by: Cédric Le Goater Signed-off-by: Cédric Le Goater (cherry picked from commit 931150e56b056b120c868f94751722710df0b6a7) Signed-off-by: Michael Tokarev --- diff --git a/hw/vfio/display.c b/hw/vfio/display.c index bec864f482f..837d9e6a309 100644 --- a/hw/vfio/display.c +++ b/hw/vfio/display.c @@ -243,6 +243,8 @@ static VFIODMABuf *vfio_display_get_dmabuf(VFIOPCIDevice *vdev, dmabuf->dmabuf_id = plane.dmabuf_id; dmabuf->buf.width = plane.width; dmabuf->buf.height = plane.height; + dmabuf->buf.backing_width = plane.width; + dmabuf->buf.backing_height = plane.height; dmabuf->buf.stride = plane.stride; dmabuf->buf.fourcc = plane.drm_format; dmabuf->buf.modifier = plane.drm_format_mod;