[RFC PATCH 0/2] Enable additional display heads on guest launch

Damian Hobson-Garcia posted 2 patches 1 year ago
hw/display/virtio-gpu-base.c   | 12 +++++++++---
include/hw/virtio/virtio-gpu.h |  7 ++++++-
ui/gtk.c                       |  4 ++++
3 files changed, 19 insertions(+), 4 deletions(-)
[RFC PATCH 0/2] Enable additional display heads on guest launch
Posted by Damian Hobson-Garcia 1 year ago
Hello all,

I would like to propose an option to enable multiple heads (outputs) on
startup when the "max_outputs" option is used on a vga device.
Currently, only 1 head is enabled by default, and all others are
enabled in response to commands from the host side UI interface.
There is also an issue on gitlab that describes this situation
(https://gitlab.com/qemu-project/qemu/-/issues/1107)

The main application that I am thinking of is for running headless
for CI testing of Yocto images.  In this configuration, it can be
sufficient to grab a screenshot of the display from within the guest
for testing purposes.  To do this, however, the DRM connectors must
appear to be connected in the guest.

For now, I've just implemented a simple option that will enable all
of the heads on a virtio-vga/gpu device as an illustration, and was
hoping to get some feedback on the concept.  If there is agreement
I can extend this out to qxl as well. I have tested this with
the following -display settings: none, gtk, sdl, vnc.  

Thank you,
Damian

Damian Hobson-Garcia (2):
  gtk: Make sure widget is realized before updating
  virtio-gpu: Add an option to connect all outputs on startup

 hw/display/virtio-gpu-base.c   | 12 +++++++++---
 include/hw/virtio/virtio-gpu.h |  7 ++++++-
 ui/gtk.c                       |  4 ++++
 3 files changed, 19 insertions(+), 4 deletions(-)

-- 
2.25.1