aboutsummaryrefslogtreecommitdiff
path: root/hw/display/qxl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-08-26 14:16:30 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-09-04 08:22:48 +0200
commit54a85d462447c1cb8a1638578a7fd086350b4d2d (patch)
tree0fa270ba99f627e5c4ffba1996b58c837c397357 /hw/display/qxl.c
parent30eaca3acdf17d7bcbd1213eb149c02037edfb0b (diff)
vbe: make bochs dispi interface return the correct memory size with qxl
VgaState->vram_size is the size of the pci bar. In case of qxl not the whole pci bar can be used as vga framebuffer. Add a new variable vbe_size to handle that case. By default (if unset) it equals vram_size, but qxl can set vbe_size to something else. This makes sure VBE_DISPI_INDEX_VIDEO_MEMORY_64K returns correct results and sanity checks are done with the correct size too. Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'hw/display/qxl.c')
-rw-r--r--hw/display/qxl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index d43aa49eb8..652af99001 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -2063,6 +2063,7 @@ static int qxl_init_primary(PCIDevice *dev)
qxl->id = 0;
qxl_init_ramsize(qxl);
+ vga->vbe_size = qxl->vgamem_size;
vga->vram_size_mb = qxl->vga.vram_size >> 20;
vga_common_init(vga, OBJECT(dev), true);
vga_init(vga, OBJECT(dev),