From: Paul Menzel <paulepanter@users.sourceforge.net>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: kevin@koconnor.net, seabios@seabios.org, qemu-devel@nongnu.org,
kraxel@redhat.com
Subject: Re: [Qemu-devel] [SeaBIOS] [PATCH v3] pciinit: Enable default VGA device
Date: Wed, 20 Mar 2013 19:05:11 +0100 [thread overview]
Message-ID: <1363802711.26710.3.camel@mattotaupa> (raw)
In-Reply-To: <20130320165728.22281.10294.stgit@bling.home>
[-- Attachment #1: Type: text/plain, Size: 2112 bytes --]
Dear Alex,
Am Mittwoch, den 20.03.2013, 10:58 -0600 schrieb Alex Williamson:
> As QEMU gains PCI bridge and PCIe root port support,
could you give a commit or version for QEMU please.
> we won't always find the VGA device on the root bus. We therefore
> need to add support to find and enable a VGA device and the path to it
> through the VGA Enable support in the PCI bridge control register.
Just to be sure, did you test this with older QEMU too?
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
> ---
>
> v3: use pci_config_maskw() to trim out some code
> v2: move to qemu specific pciinit.c
>
> src/optionroms.c | 2 +-
> src/pciinit.c | 40 ++++++++++++++++++++++++++++++++++++++++
> src/util.h | 1 +
> 3 files changed, 42 insertions(+), 1 deletion(-)
>
> diff --git a/src/optionroms.c b/src/optionroms.c
> index caa2151..ac92613 100644
> --- a/src/optionroms.c
> +++ b/src/optionroms.c
> @@ -213,7 +213,7 @@ run_file_roms(const char *prefix, int isvga, u64 *sources)
> ****************************************************************/
>
> // Verify device is a vga device with legacy address decoding enabled.
> -static int
> +int
> is_pci_vga(struct pci_device *pci)
> {
> if (pci->class != PCI_CLASS_DISPLAY_VGA)
> diff --git a/src/pciinit.c b/src/pciinit.c
> index ce0a4cc..bb9355f 100644
> --- a/src/pciinit.c
> +++ b/src/pciinit.c
> @@ -316,6 +316,44 @@ static void pci_bios_init_devices(void)
> }
> }
>
> +static void pci_enable_default_vga(void)
> +{
> + struct pci_device *pci;
> +
> + foreachpci(pci) {
> + if (is_pci_vga(pci)) {
> + dprintf(1, "PCI: Using %02x:%02x.%x for primary VGA\n",
> + pci_bdf_to_bus(pci->bdf), pci_bdf_to_dev(pci->bdf),
> + pci_bdf_to_fn(pci->bdf));
As this is used several times, a function returning a string with %02x:%
02x.%x would be handy.
> + return;
> + }
> + }
[…]
Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
Thahks,
Paul
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2013-03-20 18:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 16:58 [Qemu-devel] [PATCH v3] pciinit: Enable default VGA device Alex Williamson
2013-03-20 18:05 ` Paul Menzel [this message]
2013-03-20 18:18 ` [Qemu-devel] [SeaBIOS] " Alex Williamson
2013-03-21 6:49 ` [Qemu-devel] " Gerd Hoffmann
2013-03-23 0:50 ` Kevin O'Connor
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=1363802711.26710.3.camel@mattotaupa \
--to=paulepanter@users.sourceforge.net \
--cc=alex.williamson@redhat.com \
--cc=kevin@koconnor.net \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=seabios@seabios.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).