From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34544) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA5QK-0008NE-Pn for qemu-devel@nongnu.org; Fri, 07 Sep 2012 16:45:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TA5QJ-0002AZ-8m for qemu-devel@nongnu.org; Fri, 07 Sep 2012 16:45:08 -0400 Received: from hall.aurel32.net ([88.191.126.93]:56520) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TA5QI-00022q-O5 for qemu-devel@nongnu.org; Fri, 07 Sep 2012 16:45:07 -0400 Date: Fri, 7 Sep 2012 22:45:02 +0200 From: Aurelien Jarno Message-ID: <20120907204502.GE6024@ohm.aurel32.net> References: <1347031634-12526-1-git-send-email-aurelien@aurel32.net> <1347031634-12526-2-git-send-email-aurelien@aurel32.net> <852F16CD-A633-4EAD-915F-877CEBF4BCCD@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <852F16CD-A633-4EAD-915F-877CEBF4BCCD@suse.de> Subject: Re: [Qemu-devel] [PATCH 2/3] g3beige: add a video card only when requested List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: "qemu-devel@nongnu.org" On Fri, Sep 07, 2012 at 08:58:06PM +0200, Alexander Graf wrote: > > > On 07.09.2012, at 17:27, Aurelien Jarno wrote: > > > The g3beige machine always add a video card, even when the "-vga none" > > is passed. Fix that by checking if it is enabled or not before > > instanciating it. > > > > Cc: Alexander Graf > > Signed-off-by: Aurelien Jarno > > --- > > hw/ppc_oldworld.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/hw/ppc_oldworld.c b/hw/ppc_oldworld.c > > index 1dcd8a6..363b0e5 100644 > > --- a/hw/ppc_oldworld.c > > +++ b/hw/ppc_oldworld.c > > @@ -250,7 +250,9 @@ static void ppc_heathrow_init (ram_addr_t ram_size, > > pci_bus = pci_grackle_init(0xfec00000, pic, > > get_system_memory(), > > get_system_io()); > > - pci_vga_init(pci_bus); > > + if (std_vga_enabled) { > > + pci_vga_init(pci_bus); > > Shouldn't we try to have some generic function that can create any PCI VGA adapter for us? We might want to throw a cirrus or qxl one in a g3beige. > Other hardware supporting different videocard are using this kind of code (a bit more complicated for PC as it allow the card to be on the ISA or on the PCI bus): | /* Optional PCI video card */ | if (cirrus_vga_enabled) { | pci_cirrus_vga_init(pci_bus); | } else if (vmsvga_enabled) { | pci_vmsvga_init(pci_bus); | } else if (std_vga_enabled) { | pci_vga_init(pci_bus); | } -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net