qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/3] vga: make PCI devices optional
Date: Sun, 09 Oct 2011 12:47:10 +0200	[thread overview]
Message-ID: <4E917BAE.6020804@web.de> (raw)
In-Reply-To: <CAAu8pHuz31G8WVzOGG8qt4xEuxrqT-Ho9EMJqvKDYc1R2AT2gA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1591 bytes --]

On 2011-10-09 12:22, Blue Swirl wrote:
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
>  hw/cirrus_vga.c |    5 -----
>  hw/pc.c         |    6 +++++-
>  hw/pc.h         |   26 ++++++++++++++++++++++++--
>  hw/pci.c        |   18 ++++++++++++++++++
>  hw/pci.h        |    4 ++++
>  hw/vga-pci.c    |    6 ------
>  6 files changed, 51 insertions(+), 14 deletions(-)
> 
> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
> index c7e365b..a11444c 100644
> --- a/hw/cirrus_vga.c
> +++ b/hw/cirrus_vga.c
> @@ -2955,11 +2955,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
>       return 0;
>  }
> 
> -void pci_cirrus_vga_init(PCIBus *bus)
> -{
> -    pci_create_simple(bus, -1, "cirrus-vga");
> -}
> -
>  static PCIDeviceInfo cirrus_vga_info = {
>      .qdev.name    = "cirrus-vga",
>      .qdev.desc    = "Cirrus CLGD 54xx VGA",
> diff --git a/hw/pc.c b/hw/pc.c
> index 203627d..97f93d4 100644
> --- a/hw/pc.c
> +++ b/hw/pc.c
> @@ -1068,7 +1068,11 @@ void pc_vga_init(PCIBus *pci_bus)
>  {
>      if (cirrus_vga_enabled) {
>          if (pci_bus) {
> -            pci_cirrus_vga_init(pci_bus);
> +            if (!pci_cirrus_vga_init(pci_bus)) {
> +                fprintf(stderr, "Warning: cirrus_vga not available,"
> +                        " using standard VGA instead\n");
> +                pci_vga_init(pci_bus);
> +            }

If you adjust the default vga interface in case cirrus is configured
out, you can simply fail here. Would be more user-friendly, specifically
if the user actually specified -vga cirrus.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2011-10-09 10:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-09 10:22 [Qemu-devel] [PATCH 1/3] vga: make PCI devices optional Blue Swirl
2011-10-09 10:47 ` Jan Kiszka [this message]
2011-10-16 16:45   ` Blue Swirl
2011-10-16 17:21     ` Jan Kiszka

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=4E917BAE.6020804@web.de \
    --to=jan.kiszka@web.de \
    --cc=blauwirbel@gmail.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).