* [Qemu-devel] [PATCH 1/3] sun4u: add a video card only when requested
@ 2012-09-07 15:27 Aurelien Jarno
  2012-09-07 15:27 ` [Qemu-devel] [PATCH 2/3] g3beige: " Aurelien Jarno
  2012-09-07 15:27 ` [Qemu-devel] [PATCH 3/3] mac99: " Aurelien Jarno
  0 siblings, 2 replies; 7+ messages in thread
From: Aurelien Jarno @ 2012-09-07 15:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Aurelien Jarno
The sun4u machine always add a video card, even when "-vga none" is
passed. Fix that by checking if it is enabled or not before
instanciating it.
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 hw/sun4u.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/sun4u.c b/hw/sun4u.c
index 07cd042..c6bf6eb 100644
--- a/hw/sun4u.c
+++ b/hw/sun4u.c
@@ -821,7 +821,9 @@ static void sun4uv_init(MemoryRegion *address_space_mem,
     ivec_irqs = qemu_allocate_irqs(cpu_set_ivec_irq, env, IVEC_MAX);
     pci_bus = pci_apb_init(APB_SPECIAL_BASE, APB_MEM_BASE, ivec_irqs, &pci_bus2,
                            &pci_bus3, &pbm_irqs);
-    pci_vga_init(pci_bus);
+    if (std_vga_enabled) {
+        pci_vga_init(pci_bus);
+    }
 
     // XXX Should be pci_bus3
     isa_bus = pci_ebus_init(pci_bus, -1, pbm_irqs);
-- 
1.7.10.4
^ permalink raw reply related	[flat|nested] 7+ messages in thread* [Qemu-devel] [PATCH 2/3] g3beige: add a video card only when requested
  2012-09-07 15:27 [Qemu-devel] [PATCH 1/3] sun4u: add a video card only when requested Aurelien Jarno
@ 2012-09-07 15:27 ` Aurelien Jarno
  2012-09-07 18:58   ` Alexander Graf
  2012-09-07 15:27 ` [Qemu-devel] [PATCH 3/3] mac99: " Aurelien Jarno
  1 sibling, 1 reply; 7+ messages in thread
From: Aurelien Jarno @ 2012-09-07 15:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexander Graf, Aurelien Jarno
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 <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 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);
+    }
 
     escc_mem = escc_init(0, pic[0x0f], pic[0x10], serial_hds[0],
                                serial_hds[1], ESCC_CLOCK, 4);
-- 
1.7.10.4
^ permalink raw reply related	[flat|nested] 7+ messages in thread* Re: [Qemu-devel] [PATCH 2/3] g3beige: add a video card only when requested
  2012-09-07 15:27 ` [Qemu-devel] [PATCH 2/3] g3beige: " Aurelien Jarno
@ 2012-09-07 18:58   ` Alexander Graf
  2012-09-07 20:45     ` Aurelien Jarno
  0 siblings, 1 reply; 7+ messages in thread
From: Alexander Graf @ 2012-09-07 18:58 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel@nongnu.org
On 07.09.2012, at 17:27, Aurelien Jarno <aurelien@aurel32.net> 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 <agraf@suse.de>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> 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.
Alex
> +    }
> 
>     escc_mem = escc_init(0, pic[0x0f], pic[0x10], serial_hds[0],
>                                serial_hds[1], ESCC_CLOCK, 4);
> -- 
> 1.7.10.4
> 
^ permalink raw reply	[flat|nested] 7+ messages in thread* Re: [Qemu-devel] [PATCH 2/3] g3beige: add a video card only when requested
  2012-09-07 18:58   ` Alexander Graf
@ 2012-09-07 20:45     ` Aurelien Jarno
  2012-09-07 20:50       ` Alexander Graf
  2012-09-07 20:55       ` Alexander Graf
  0 siblings, 2 replies; 7+ messages in thread
From: Aurelien Jarno @ 2012-09-07 20:45 UTC (permalink / raw)
  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 <aurelien@aurel32.net> 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 <agraf@suse.de>
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> > 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
^ permalink raw reply	[flat|nested] 7+ messages in thread* Re: [Qemu-devel] [PATCH 2/3] g3beige: add a video card only when requested
  2012-09-07 20:45     ` Aurelien Jarno
@ 2012-09-07 20:50       ` Alexander Graf
  2012-09-07 20:55       ` Alexander Graf
  1 sibling, 0 replies; 7+ messages in thread
From: Alexander Graf @ 2012-09-07 20:50 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel@nongnu.org
On 07.09.2012, at 22:45, Aurelien Jarno wrote:
> On Fri, Sep 07, 2012 at 08:58:06PM +0200, Alexander Graf wrote:
>> 
>> 
>> On 07.09.2012, at 17:27, Aurelien Jarno <aurelien@aurel32.net> 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 <agraf@suse.de>
>>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>>> ---
>>> 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);
> |    }
Yup. Can we move that to some generic pci file so that we don't have to copy it all over the place?
Alex
^ permalink raw reply	[flat|nested] 7+ messages in thread* Re: [Qemu-devel] [PATCH 2/3] g3beige: add a video card only when requested
  2012-09-07 20:45     ` Aurelien Jarno
  2012-09-07 20:50       ` Alexander Graf
@ 2012-09-07 20:55       ` Alexander Graf
  1 sibling, 0 replies; 7+ messages in thread
From: Alexander Graf @ 2012-09-07 20:55 UTC (permalink / raw)
  To: Aurelien Jarno; +Cc: qemu-devel@nongnu.org
On 07.09.2012, at 22:45, Aurelien Jarno wrote:
> On Fri, Sep 07, 2012 at 08:58:06PM +0200, Alexander Graf wrote:
>> 
>> 
>> On 07.09.2012, at 17:27, Aurelien Jarno <aurelien@aurel32.net> 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 <agraf@suse.de>
>>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
>>> ---
>>> 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);
> |    }
Yup. Can we move that to some generic pci file so that we don't have to copy it all over the place?
Alex
^ permalink raw reply	[flat|nested] 7+ messages in thread
* [Qemu-devel] [PATCH 3/3] mac99: add a video card only when requested
  2012-09-07 15:27 [Qemu-devel] [PATCH 1/3] sun4u: add a video card only when requested Aurelien Jarno
  2012-09-07 15:27 ` [Qemu-devel] [PATCH 2/3] g3beige: " Aurelien Jarno
@ 2012-09-07 15:27 ` Aurelien Jarno
  1 sibling, 0 replies; 7+ messages in thread
From: Aurelien Jarno @ 2012-09-07 15:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: Alexander Graf, Aurelien Jarno
The mac99 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 <agraf@suse.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 hw/ppc_newworld.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/ppc_newworld.c b/hw/ppc_newworld.c
index e95cfe8..6db8b3a 100644
--- a/hw/ppc_newworld.c
+++ b/hw/ppc_newworld.c
@@ -330,7 +330,9 @@ static void ppc_core99_init (ram_addr_t ram_size,
         machine_arch = ARCH_MAC99;
     }
     /* init basic PC hardware */
-    pci_vga_init(pci_bus);
+    if (std_vga_enabled) {
+        pci_vga_init(pci_bus);
+    }
 
     escc_mem = escc_init(0, pic[0x25], pic[0x24],
                          serial_hds[0], serial_hds[1], ESCC_CLOCK, 4);
-- 
1.7.10.4
^ permalink raw reply related	[flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-09-07 20:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-07 15:27 [Qemu-devel] [PATCH 1/3] sun4u: add a video card only when requested Aurelien Jarno
2012-09-07 15:27 ` [Qemu-devel] [PATCH 2/3] g3beige: " Aurelien Jarno
2012-09-07 18:58   ` Alexander Graf
2012-09-07 20:45     ` Aurelien Jarno
2012-09-07 20:50       ` Alexander Graf
2012-09-07 20:55       ` Alexander Graf
2012-09-07 15:27 ` [Qemu-devel] [PATCH 3/3] mac99: " Aurelien Jarno
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).