vga-pci: use PCI_VGA_MMIO_SIZE
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Message-id: 20180522165058.15404-3-kraxel@redhat.com
This commit is contained in:
parent
a3ee49f075
commit
83ff909f93
|
@ -232,7 +232,8 @@ static void pci_std_vga_realize(PCIDevice *dev, Error **errp)
|
||||||
|
|
||||||
/* mmio bar for vga register access */
|
/* mmio bar for vga register access */
|
||||||
if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_MMIO)) {
|
if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_MMIO)) {
|
||||||
memory_region_init(&d->mmio, NULL, "vga.mmio", 4096);
|
memory_region_init(&d->mmio, NULL, "vga.mmio",
|
||||||
|
PCI_VGA_MMIO_SIZE);
|
||||||
|
|
||||||
if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
|
if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
|
||||||
qext = true;
|
qext = true;
|
||||||
|
@ -267,7 +268,8 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp)
|
||||||
s->con = graphic_console_init(DEVICE(dev), 0, s->hw_ops, s);
|
s->con = graphic_console_init(DEVICE(dev), 0, s->hw_ops, s);
|
||||||
|
|
||||||
/* mmio bar */
|
/* mmio bar */
|
||||||
memory_region_init(&d->mmio, OBJECT(dev), "vga.mmio", 4096);
|
memory_region_init(&d->mmio, OBJECT(dev), "vga.mmio",
|
||||||
|
PCI_VGA_MMIO_SIZE);
|
||||||
|
|
||||||
if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
|
if (d->flags & (1 << PCI_VGA_FLAG_ENABLE_QEXT)) {
|
||||||
qext = true;
|
qext = true;
|
||||||
|
|
Loading…
Reference in a new issue