From: Eric Blake <eblake@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, qemu-devel@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 3/3] display/stdvga: add edid support.
Date: Wed, 12 Sep 2018 09:58:15 -0500 [thread overview]
Message-ID: <efd77dd1-0402-c68e-7ee9-e8b240c4abd9@redhat.com> (raw)
In-Reply-To: <20180912123700.7708-3-kraxel@redhat.com>
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
s/lets/let's/
> EDID data block there.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> 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
next prev parent reply other threads:[~2018-09-12 15:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-12 12:36 [Qemu-devel] [PATCH 1/3] display/edid: add edid generator to qemu Gerd Hoffmann
2018-09-12 12:36 ` [Qemu-devel] [PATCH 2/3] display/edid: add region helper Gerd Hoffmann
2018-09-13 21:05 ` Philippe Mathieu-Daudé
2018-09-12 12:37 ` [Qemu-devel] [PATCH 3/3] display/stdvga: add edid support Gerd Hoffmann
2018-09-12 14:58 ` Eric Blake [this message]
2018-09-13 7:19 ` Gerd Hoffmann
2018-09-12 14:55 ` [Qemu-devel] [PATCH 1/3] display/edid: add edid generator to qemu Eric Blake
2018-09-12 18:01 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=efd77dd1-0402-c68e-7ee9-e8b240c4abd9@redhat.com \
--to=eblake@redhat.com \
--cc=kraxel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).