[PATCH v3 2/4] qemu: Generate 'xres' and 'yres' for video devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Julio Faracco <jcfaracco@xxxxxxxxx>

Now, QEMU command line can define 'xres' and 'yres' if XML contains both
properties from video model. This is generetaed if resolution was set.
Code let QEMU handle if video model supports this feature.

Signed-off-by: Julio Faracco <jcfaracco@xxxxxxxxx>
---
 src/qemu/qemu_command.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index cbf25d5f07..99b43243e3 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -4596,6 +4596,11 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
             virBufferAsprintf(&buf, ",vgamem=%uk", video->vram);
     }
 
+    if (video->res && video->res->x && video->res->y) {
+        /* QEMU accepts resolution xres and yres. */
+        virBufferAsprintf(&buf, ",xres=%u,yres=%u", video->res->x, video->res->y);
+    }
+
     if (qemuBuildDeviceAddressStr(&buf, def, &video->info, qemuCaps) < 0)
         return NULL;
 
-- 
2.20.1

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux