[Top][All Lists]

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

Re: [Qemu-devel] [PATCH 3/3] display/stdvga: add edid support.

From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH 3/3] display/stdvga: add edid support.
Date: Wed, 12 Sep 2018 09:58:15 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0

On 9/12/18 7:37 AM, Gerd Hoffmann wrote:
This patch adds edid support to the qemu stdvga.  It is turned off by
default and can be enabled with the new edid property.  The patch also
adds xres and yres properties to specify the video mode you want the
guest use.  Works only with edid enabled and updated guest driver.

The mmio bar of the stdvga has some unused address space at the start.
It was reserved just in case it'll be needed for virtio, but it turned
out to not be needed for that.  So lets use that region to place the


EDID data block there.

Signed-off-by: Gerd Hoffmann <address@hidden>
  docs/specs/standard-vga.txt |  2 +-
  hw/display/vga_int.h        |  2 +-
  hw/display/vga-pci.c        | 42 ++++++++++++++++++++++++++++++++++++++----
  hw/display/virtio-vga.c     |  2 +-
  4 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/docs/specs/standard-vga.txt b/docs/specs/standard-vga.txt
index 19d2a74509..18f75f1b30 100644
--- a/docs/specs/standard-vga.txt
+++ b/docs/specs/standard-vga.txt
@@ -61,7 +61,7 @@ MMIO area spec
Likewise applies to the pci variant only for obvious reasons. -0000 - 03ff : reserved, for possible virtio extension.
+0000 - 03ff : edid data blob.

+    if (edid) {
+        qemu_edid_info info = {
+            .prefx = d->xres,
+            .prefy = d->yres,
+        };
+        qemu_edid_generate(d->edid, sizeof(d->edid), &info);
+        qemu_edid_region_io(&subs[3], owner, d->edid, sizeof(d->edid));
+        memory_region_add_subregion(parent, 0, &subs[3]);

Is there ever a risk that this could overflow? Or, if the blob is always smaller than 0x3ff, should we still leave reserved bytes?

Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

reply via email to

[Prev in Thread] Current Thread [Next in Thread]