]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/display: Allow injection of virtio-gpu EDID name
authorAndrew Keesler <ankeesler@google.com>
Wed, 9 Jul 2025 12:11:26 +0000 (12:11 +0000)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 15 Jul 2025 06:22:33 +0000 (10:22 +0400)
commit454f4b0f593b149c7a6d8192e1ed3de00de9ae24
tree5321d490d5192de4c594819aeeb0ad430091d1e1
parentf851cd65ebe24cc716a70a2fa68c149e5440f2f4
hw/display: Allow injection of virtio-gpu EDID name

Thanks to 72d277a71ed2cb32, and others, EDID (Extended Display
Identification Data) is propagated by QEMU such that a virtual display
presents legitimate metadata (e.g., name, serial number, preferred
resolutions, etc.) to its connected guest.

This change adds the ability to specify the EDID name for a particular
virtio-vga display. Previously, every virtual display would have the same
name: "QEMU Monitor". Now, we can inject names of displays in order to test
guest behavior that is specific to display names. We provide the ability to
inject the display name from the frontend since this is guest visible
data. Furthermore, this makes it clear where N potential display outputs
would get their name from (which will be added in a future change).

Note that we have elected to use a struct here for output data for
extensibility - we intend to add per-output fields like resolution in a
future change.

It should be noted that EDID names longer than 12 bytes will be truncated
per spec (I think?).

Testing: verified that when I specified 2 outputs for a virtio-gpu with
edid_name set, the names matched those that I configured with my vnc
display.

  -display vnc=localhost:0,id=aaa,display=vga,head=0 \
  -display vnc=localhost:1,id=bbb,display=vga,head=1 \
  -device '{"driver":"virtio-vga",
            "max_outputs":2,
            "id":"vga",
            "outputs":[
              {
                 "name":"AAA"
              },
              {
                 "name":"BBB"
              }
            ]}'

Signed-off-by: Andrew Keesler <ankeesler@google.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20250709121126.2946088-2-ankeesler@google.com>
hw/core/qdev-properties-system.c
hw/display/virtio-gpu-base.c
include/hw/display/edid.h
include/hw/qdev-properties-system.h
include/hw/virtio/virtio-gpu.h
qapi/virtio.json