Message ID | 1347103584-20598-6-git-send-email-aurelien@aurel32.net |
---|---|
State | New |
Headers | show |
On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote: > This remove the fallback to std-vga in case, as availability of the > requested vga device is now tested in vl.c, and returns an error message > to the user. > > Cc: Richard Henderson <rth@twiddle.net> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> > --- > hw/alpha_dp264.c | 2 +- > hw/alpha_pci.c | 24 ------------------------ > hw/alpha_sys.h | 2 -- > 3 files changed, 1 insertion(+), 27 deletions(-) > > diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c > index 9eb939f..5ea04c7 100644 > --- a/hw/alpha_dp264.c > +++ b/hw/alpha_dp264.c > @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size, > isa_create_simple(isa_bus, "i8042"); > > /* VGA setup. Don't bother loading the bios. */ > - alpha_pci_vga_setup(pci_bus); > + pci_vga_init(pci_bus); > > /* Serial code setup. */ > for (i = 0; i < MAX_SERIAL_PORTS; ++i) { > diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c > index 0352e72..8079a46 100644 > --- a/hw/alpha_pci.c > +++ b/hw/alpha_pci.c > @@ -10,8 +10,6 @@ > #include "alpha_sys.h" > #include "qemu-log.h" > #include "sysemu.h" > -#include "vmware_vga.h" > -#include "vga-pci.h" > > > /* PCI IO reads/writes, to byte-word addressable memory. */ > @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = { > .max_access_size = 4, > }, > }; > - > -void alpha_pci_vga_setup(PCIBus *pci_bus) > -{ > - switch (vga_interface_type) { > -#ifdef CONFIG_SPICE > - case VGA_QXL: > - pci_create_simple(pci_bus, -1, "qxl-vga"); > - return; > -#endif > - case VGA_CIRRUS: > - pci_cirrus_vga_init(pci_bus); > - return; > - case VGA_VMWARE: > - pci_vmsvga_init(pci_bus); > - return; > - } > - /* If VGA is enabled at all, and one of the above didn't work, then > - fallback to Standard VGA. */ > - if (vga_interface_type != VGA_NONE) { > - pci_std_vga_init(pci_bus); > - } You're removing the fallback logic here, no? Alex > -} > diff --git a/hw/alpha_sys.h b/hw/alpha_sys.h > index de40f8b..7604d09 100644 > --- a/hw/alpha_sys.h > +++ b/hw/alpha_sys.h > @@ -19,6 +19,4 @@ extern const MemoryRegionOps alpha_pci_bw_io_ops; > extern const MemoryRegionOps alpha_pci_conf1_ops; > extern const MemoryRegionOps alpha_pci_iack_ops; > > -void alpha_pci_vga_setup(PCIBus *pci_bus); > - > #endif > -- > 1.7.10.4 > >
On Sat, Sep 08, 2012 at 04:47:43PM +0200, Alexander Graf wrote: > > > On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote: > > > This remove the fallback to std-vga in case, as availability of the > > requested vga device is now tested in vl.c, and returns an error message > > to the user. > > > > Cc: Richard Henderson <rth@twiddle.net> > > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> > > --- > > hw/alpha_dp264.c | 2 +- > > hw/alpha_pci.c | 24 ------------------------ > > hw/alpha_sys.h | 2 -- > > 3 files changed, 1 insertion(+), 27 deletions(-) > > > > diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c > > index 9eb939f..5ea04c7 100644 > > --- a/hw/alpha_dp264.c > > +++ b/hw/alpha_dp264.c > > @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size, > > isa_create_simple(isa_bus, "i8042"); > > > > /* VGA setup. Don't bother loading the bios. */ > > - alpha_pci_vga_setup(pci_bus); > > + pci_vga_init(pci_bus); > > > > /* Serial code setup. */ > > for (i = 0; i < MAX_SERIAL_PORTS; ++i) { > > diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c > > index 0352e72..8079a46 100644 > > --- a/hw/alpha_pci.c > > +++ b/hw/alpha_pci.c > > @@ -10,8 +10,6 @@ > > #include "alpha_sys.h" > > #include "qemu-log.h" > > #include "sysemu.h" > > -#include "vmware_vga.h" > > -#include "vga-pci.h" > > > > > > /* PCI IO reads/writes, to byte-word addressable memory. */ > > @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = { > > .max_access_size = 4, > > }, > > }; > > - > > -void alpha_pci_vga_setup(PCIBus *pci_bus) > > -{ > > - switch (vga_interface_type) { > > -#ifdef CONFIG_SPICE > > - case VGA_QXL: > > - pci_create_simple(pci_bus, -1, "qxl-vga"); > > - return; > > -#endif > > - case VGA_CIRRUS: > > - pci_cirrus_vga_init(pci_bus); > > - return; > > - case VGA_VMWARE: > > - pci_vmsvga_init(pci_bus); > > - return; > > - } > > - /* If VGA is enabled at all, and one of the above didn't work, then > > - fallback to Standard VGA. */ > > - if (vga_interface_type != VGA_NONE) { > > - pci_std_vga_init(pci_bus); > > - } > > You're removing the fallback logic here, no? > Yes, because the availability of the other type is now checked in vl.c so that pci_vga_init() is able to create the requested card. That way the users get an error message instead of having a card different to what they request.
On 08.09.2012, at 16:57, Aurelien Jarno <aurelien@aurel32.net> wrote: > On Sat, Sep 08, 2012 at 04:47:43PM +0200, Alexander Graf wrote: >> >> >> On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote: >> >>> This remove the fallback to std-vga in case, as availability of the >>> requested vga device is now tested in vl.c, and returns an error message >>> to the user. >>> >>> Cc: Richard Henderson <rth@twiddle.net> >>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> >>> --- >>> hw/alpha_dp264.c | 2 +- >>> hw/alpha_pci.c | 24 ------------------------ >>> hw/alpha_sys.h | 2 -- >>> 3 files changed, 1 insertion(+), 27 deletions(-) >>> >>> diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c >>> index 9eb939f..5ea04c7 100644 >>> --- a/hw/alpha_dp264.c >>> +++ b/hw/alpha_dp264.c >>> @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size, >>> isa_create_simple(isa_bus, "i8042"); >>> >>> /* VGA setup. Don't bother loading the bios. */ >>> - alpha_pci_vga_setup(pci_bus); >>> + pci_vga_init(pci_bus); >>> >>> /* Serial code setup. */ >>> for (i = 0; i < MAX_SERIAL_PORTS; ++i) { >>> diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c >>> index 0352e72..8079a46 100644 >>> --- a/hw/alpha_pci.c >>> +++ b/hw/alpha_pci.c >>> @@ -10,8 +10,6 @@ >>> #include "alpha_sys.h" >>> #include "qemu-log.h" >>> #include "sysemu.h" >>> -#include "vmware_vga.h" >>> -#include "vga-pci.h" >>> >>> >>> /* PCI IO reads/writes, to byte-word addressable memory. */ >>> @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = { >>> .max_access_size = 4, >>> }, >>> }; >>> - >>> -void alpha_pci_vga_setup(PCIBus *pci_bus) >>> -{ >>> - switch (vga_interface_type) { >>> -#ifdef CONFIG_SPICE >>> - case VGA_QXL: >>> - pci_create_simple(pci_bus, -1, "qxl-vga"); >>> - return; >>> -#endif >>> - case VGA_CIRRUS: >>> - pci_cirrus_vga_init(pci_bus); >>> - return; >>> - case VGA_VMWARE: >>> - pci_vmsvga_init(pci_bus); >>> - return; >>> - } >>> - /* If VGA is enabled at all, and one of the above didn't work, then >>> - fallback to Standard VGA. */ >>> - if (vga_interface_type != VGA_NONE) { >>> - pci_std_vga_init(pci_bus); >>> - } >> >> You're removing the fallback logic here, no? >> > > Yes, because the availability of the other type is now checked in vl.c > so that pci_vga_init() is able to create the requested card. That way > the users get an error message instead of having a card different to what > they request. But this is alpha and you're calling pci_vga_init, not pc_vga_init :). Alex > > -- > Aurelien Jarno GPG: 1024D/F1BCDB73 > aurelien@aurel32.net http://www.aurel32.net
On 08.09.2012, at 17:00, Alexander Graf <agraf@suse.de> wrote: > > > On 08.09.2012, at 16:57, Aurelien Jarno <aurelien@aurel32.net> wrote: > >> On Sat, Sep 08, 2012 at 04:47:43PM +0200, Alexander Graf wrote: >>> >>> >>> On 08.09.2012, at 13:26, Aurelien Jarno <aurelien@aurel32.net> wrote: >>> >>>> This remove the fallback to std-vga in case, as availability of the >>>> requested vga device is now tested in vl.c, and returns an error message >>>> to the user. >>>> >>>> Cc: Richard Henderson <rth@twiddle.net> >>>> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> >>>> --- >>>> hw/alpha_dp264.c | 2 +- >>>> hw/alpha_pci.c | 24 ------------------------ >>>> hw/alpha_sys.h | 2 -- >>>> 3 files changed, 1 insertion(+), 27 deletions(-) >>>> >>>> diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c >>>> index 9eb939f..5ea04c7 100644 >>>> --- a/hw/alpha_dp264.c >>>> +++ b/hw/alpha_dp264.c >>>> @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size, >>>> isa_create_simple(isa_bus, "i8042"); >>>> >>>> /* VGA setup. Don't bother loading the bios. */ >>>> - alpha_pci_vga_setup(pci_bus); >>>> + pci_vga_init(pci_bus); >>>> >>>> /* Serial code setup. */ >>>> for (i = 0; i < MAX_SERIAL_PORTS; ++i) { >>>> diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c >>>> index 0352e72..8079a46 100644 >>>> --- a/hw/alpha_pci.c >>>> +++ b/hw/alpha_pci.c >>>> @@ -10,8 +10,6 @@ >>>> #include "alpha_sys.h" >>>> #include "qemu-log.h" >>>> #include "sysemu.h" >>>> -#include "vmware_vga.h" >>>> -#include "vga-pci.h" >>>> >>>> >>>> /* PCI IO reads/writes, to byte-word addressable memory. */ >>>> @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = { >>>> .max_access_size = 4, >>>> }, >>>> }; >>>> - >>>> -void alpha_pci_vga_setup(PCIBus *pci_bus) >>>> -{ >>>> - switch (vga_interface_type) { >>>> -#ifdef CONFIG_SPICE >>>> - case VGA_QXL: >>>> - pci_create_simple(pci_bus, -1, "qxl-vga"); >>>> - return; >>>> -#endif >>>> - case VGA_CIRRUS: >>>> - pci_cirrus_vga_init(pci_bus); >>>> - return; >>>> - case VGA_VMWARE: >>>> - pci_vmsvga_init(pci_bus); >>>> - return; >>>> - } >>>> - /* If VGA is enabled at all, and one of the above didn't work, then >>>> - fallback to Standard VGA. */ >>>> - if (vga_interface_type != VGA_NONE) { >>>> - pci_std_vga_init(pci_bus); >>>> - } >>> >>> You're removing the fallback logic here, no? >>> >> >> Yes, because the availability of the other type is now checked in vl.c >> so that pci_vga_init() is able to create the requested card. That way >> the users get an error message instead of having a card different to what >> they request. > > But this is alpha and you're calling pci_vga_init, not pc_vga_init :). Ah, I misread the code. It's creating a pci std vga adapter as fallback. Then it's all fine :) Alex > > Alex > >> >> -- >> Aurelien Jarno GPG: 1024D/F1BCDB73 >> aurelien@aurel32.net http://www.aurel32.net >
On 09/08/2012 04:26 AM, Aurelien Jarno wrote: > This remove the fallback to std-vga in case, as availability of the > requested vga device is now tested in vl.c, and returns an error message > to the user. > > Cc: Richard Henderson <rth@twiddle.net> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Acked-by: Richard Henderson <rth@twiddle.net> r~
diff --git a/hw/alpha_dp264.c b/hw/alpha_dp264.c index 9eb939f..5ea04c7 100644 --- a/hw/alpha_dp264.c +++ b/hw/alpha_dp264.c @@ -77,7 +77,7 @@ static void clipper_init(ram_addr_t ram_size, isa_create_simple(isa_bus, "i8042"); /* VGA setup. Don't bother loading the bios. */ - alpha_pci_vga_setup(pci_bus); + pci_vga_init(pci_bus); /* Serial code setup. */ for (i = 0; i < MAX_SERIAL_PORTS; ++i) { diff --git a/hw/alpha_pci.c b/hw/alpha_pci.c index 0352e72..8079a46 100644 --- a/hw/alpha_pci.c +++ b/hw/alpha_pci.c @@ -10,8 +10,6 @@ #include "alpha_sys.h" #include "qemu-log.h" #include "sysemu.h" -#include "vmware_vga.h" -#include "vga-pci.h" /* PCI IO reads/writes, to byte-word addressable memory. */ @@ -109,25 +107,3 @@ const MemoryRegionOps alpha_pci_iack_ops = { .max_access_size = 4, }, }; - -void alpha_pci_vga_setup(PCIBus *pci_bus) -{ - switch (vga_interface_type) { -#ifdef CONFIG_SPICE - case VGA_QXL: - pci_create_simple(pci_bus, -1, "qxl-vga"); - return; -#endif - case VGA_CIRRUS: - pci_cirrus_vga_init(pci_bus); - return; - case VGA_VMWARE: - pci_vmsvga_init(pci_bus); - return; - } - /* If VGA is enabled at all, and one of the above didn't work, then - fallback to Standard VGA. */ - if (vga_interface_type != VGA_NONE) { - pci_std_vga_init(pci_bus); - } -} diff --git a/hw/alpha_sys.h b/hw/alpha_sys.h index de40f8b..7604d09 100644 --- a/hw/alpha_sys.h +++ b/hw/alpha_sys.h @@ -19,6 +19,4 @@ extern const MemoryRegionOps alpha_pci_bw_io_ops; extern const MemoryRegionOps alpha_pci_conf1_ops; extern const MemoryRegionOps alpha_pci_iack_ops; -void alpha_pci_vga_setup(PCIBus *pci_bus); - #endif
This remove the fallback to std-vga in case, as availability of the requested vga device is now tested in vl.c, and returns an error message to the user. Cc: Richard Henderson <rth@twiddle.net> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> --- hw/alpha_dp264.c | 2 +- hw/alpha_pci.c | 24 ------------------------ hw/alpha_sys.h | 2 -- 3 files changed, 1 insertion(+), 27 deletions(-)