vga: bugfix collection.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJbMmlrAAoJEEy22O7T6HE4SoUP/1zN6DmiRpnOz5yiWfUERqbJ 3NzA6JWjNL7sW413X71YGZPRKyestjld3G11c12KlL6MX6WVtiy0FU14/Pq3IMox OQsLfSIrXbIk6t2wC9NPS52Yyd9a1ca8UQzcAJRGhpAXSIxyr1SS009CTVkSysop fD9LZ4Cm0dC3pHAsUza9m3biDlgNzqQnseRTN3zNnzMFtnjzTTZPL+Zt2j7CjnCS g5FGYlt0FM9IdErYZ4SGTqOT1FEkQt9HyxsKRKUXsqkKuogGOrzE/KnZEVPDOhO6 3Kdz9saEBWlP30iZpP7TWnpD1w1YwkD2yd7jE71LIPYITx2UeHvwGD8lfADc23Jd +XE3H1yPsURKmfx4b/g+fu7JSyHa5pXfwxD1HOV2GgUSb2RNRTu1Yn6aoS32dFj9 1EzPXdh2iNAlRSxmVnGhrDkKNl2EYj01ZqY1MOSN6SoET0V9DIQpJuCQcB0rgHyz 9QB2sdht/RymumK2e7M48JskKdP5r9MTGMML554onZ2bu7qIcZGxzbhLelpSy0IV XELqyZ7K8rgZY56yikJtEgSVjB2powxz+m64SyK3Nti6vgFIC6k/jBYZSR8wn3cd Kl6NFHu2QsnVz+dUlo7E7yUSEP6BoCoZScXCkaWVM+XMgejxtUVUft7bvr3/k9vS viQ+ZtKIS/QQp1VanjVE =QKlm -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/vga-20180626-pull-request' into staging vga: bugfix collection. # gpg: Signature made Tue 26 Jun 2018 17:27:23 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/vga-20180626-pull-request: virtio-gpu-3d: Drop workaround for VIRTIO_GPU_CAPSET_VIRGL2 define ramfb: fix overflow vga: set owner for mmio regions Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
7e2d08863b
@ -36,8 +36,8 @@ static void ramfb_fw_cfg_write(void *dev, off_t offset, size_t len)
|
||||
{
|
||||
RAMFBState *s = dev;
|
||||
void *framebuffer;
|
||||
uint32_t stride, fourcc, format;
|
||||
hwaddr addr, length;
|
||||
uint32_t fourcc, format;
|
||||
hwaddr stride, addr, length;
|
||||
|
||||
s->width = be32_to_cpu(s->cfg.width);
|
||||
s->height = be32_to_cpu(s->cfg.height);
|
||||
|
@ -192,22 +192,23 @@ static const MemoryRegionOps pci_vga_qext_ops = {
|
||||
};
|
||||
|
||||
void pci_std_vga_mmio_region_init(VGACommonState *s,
|
||||
Object *owner,
|
||||
MemoryRegion *parent,
|
||||
MemoryRegion *subs,
|
||||
bool qext)
|
||||
{
|
||||
memory_region_init_io(&subs[0], NULL, &pci_vga_ioport_ops, s,
|
||||
memory_region_init_io(&subs[0], owner, &pci_vga_ioport_ops, s,
|
||||
"vga ioports remapped", PCI_VGA_IOPORT_SIZE);
|
||||
memory_region_add_subregion(parent, PCI_VGA_IOPORT_OFFSET,
|
||||
&subs[0]);
|
||||
|
||||
memory_region_init_io(&subs[1], NULL, &pci_vga_bochs_ops, s,
|
||||
memory_region_init_io(&subs[1], owner, &pci_vga_bochs_ops, s,
|
||||
"bochs dispi interface", PCI_VGA_BOCHS_SIZE);
|
||||
memory_region_add_subregion(parent, PCI_VGA_BOCHS_OFFSET,
|
||||
&subs[1]);
|
||||
|
||||
if (qext) {
|
||||
memory_region_init_io(&subs[2], NULL, &pci_vga_qext_ops, s,
|
||||
memory_region_init_io(&subs[2], owner, &pci_vga_qext_ops, s,
|
||||
"qemu extended regs", PCI_VGA_QEXT_SIZE);
|
||||
memory_region_add_subregion(parent, PCI_VGA_QEXT_OFFSET,
|
||||
&subs[2]);
|
||||
@ -239,7 +240,7 @@ static void pci_std_vga_realize(PCIDevice *dev, Error **errp)
|
||||
qext = true;
|
||||
pci_set_byte(&d->dev.config[PCI_REVISION_ID], 2);
|
||||
}
|
||||
pci_std_vga_mmio_region_init(s, &d->mmio, d->mrs, qext);
|
||||
pci_std_vga_mmio_region_init(s, OBJECT(dev), &d->mmio, d->mrs, qext);
|
||||
|
||||
pci_register_bar(&d->dev, 2, PCI_BASE_ADDRESS_SPACE_MEMORY, &d->mmio);
|
||||
}
|
||||
@ -275,7 +276,7 @@ static void pci_secondary_vga_realize(PCIDevice *dev, Error **errp)
|
||||
qext = true;
|
||||
pci_set_byte(&d->dev.config[PCI_REVISION_ID], 2);
|
||||
}
|
||||
pci_std_vga_mmio_region_init(s, &d->mmio, d->mrs, qext);
|
||||
pci_std_vga_mmio_region_init(s, OBJECT(dev), &d->mmio, d->mrs, qext);
|
||||
|
||||
pci_register_bar(&d->dev, 0, PCI_BASE_ADDRESS_MEM_PREFETCH, &s->vram);
|
||||
pci_register_bar(&d->dev, 2, PCI_BASE_ADDRESS_SPACE_MEMORY, &d->mmio);
|
||||
|
@ -193,6 +193,7 @@ extern const MemoryRegionOps vga_mem_ops;
|
||||
|
||||
/* vga-pci.c */
|
||||
void pci_std_vga_mmio_region_init(VGACommonState *s,
|
||||
Object *owner,
|
||||
MemoryRegion *parent,
|
||||
MemoryRegion *subs,
|
||||
bool qext);
|
||||
|
@ -152,7 +152,7 @@ static void virtio_vga_realize(VirtIOPCIProxy *vpci_dev, Error **errp)
|
||||
}
|
||||
|
||||
/* add stdvga mmio regions */
|
||||
pci_std_vga_mmio_region_init(vga, &vpci_dev->modern_bar,
|
||||
pci_std_vga_mmio_region_init(vga, OBJECT(vvga), &vpci_dev->modern_bar,
|
||||
vvga->vga_mrs, true);
|
||||
|
||||
vga->con = g->scanout[0].con;
|
||||
|
@ -22,11 +22,6 @@
|
||||
|
||||
#include "standard-headers/linux/virtio_gpu.h"
|
||||
|
||||
/* Not yet(?) defined in standard-headers, remove when possible */
|
||||
#ifndef VIRTIO_GPU_CAPSET_VIRGL2
|
||||
#define VIRTIO_GPU_CAPSET_VIRGL2 2
|
||||
#endif
|
||||
|
||||
#define TYPE_VIRTIO_GPU "virtio-gpu-device"
|
||||
#define VIRTIO_GPU(obj) \
|
||||
OBJECT_CHECK(VirtIOGPU, (obj), TYPE_VIRTIO_GPU)
|
||||
|
Loading…
Reference in New Issue
Block a user