summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann2017-04-21 11:16:31 +0200
committerGerd Hoffmann2017-04-24 10:12:28 +0200
commit104bd1dc707649fe39d0d1405ba7268ebc26edd5 (patch)
treebb94e1104175e0c20543b37f8243450e13cd76c4
parentg364fb: make display updates thread safe (diff)
downloadqemu-104bd1dc707649fe39d0d1405ba7268ebc26edd5.tar.gz
qemu-104bd1dc707649fe39d0d1405ba7268ebc26edd5.tar.xz
qemu-104bd1dc707649fe39d0d1405ba7268ebc26edd5.zip
vmsvga: fix vmsvga_update_display
Fix standard vga mode check: Both s->config and s->enabled must be set to enable vmware command fifo processing. Drop dirty tracking code from the fifo rendering code path, it isn't used anyway because vmsvga turns off dirty tracking when leaving standard vga mode. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20170421091632.30900-9-kraxel@redhat.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
-rw-r--r--hw/display/vmware_vga.c21
1 files changed, 3 insertions, 18 deletions
diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c
index 6599cf078d..ec5f27d67e 100644
--- a/hw/display/vmware_vga.c
+++ b/hw/display/vmware_vga.c
@@ -1118,9 +1118,9 @@ static void vmsvga_update_display(void *opaque)
{
struct vmsvga_state_s *s = opaque;
DisplaySurface *surface;
- bool dirty = false;
- if (!s->enable) {
+ if (!s->enable || !s->config) {
+ /* in standard vga mode */
s->vga.hw_ops->gfx_update(&s->vga);
return;
}
@@ -1131,26 +1131,11 @@ static void vmsvga_update_display(void *opaque)
vmsvga_fifo_run(s);
vmsvga_update_rect_flush(s);
- /*
- * Is it more efficient to look at vram VGA-dirty bits or wait
- * for the driver to issue SVGA_CMD_UPDATE?
- */
- if (memory_region_is_logging(&s->vga.vram, DIRTY_MEMORY_VGA)) {
- vga_sync_dirty_bitmap(&s->vga);
- dirty = memory_region_get_dirty(&s->vga.vram, 0,
- surface_stride(surface) * surface_height(surface),
- DIRTY_MEMORY_VGA);
- }
- if (s->invalidated || dirty) {
+ if (s->invalidated) {
s->invalidated = 0;
dpy_gfx_update(s->vga.con, 0, 0,
surface_width(surface), surface_height(surface));
}
- if (dirty) {
- memory_region_reset_dirty(&s->vga.vram, 0,
- surface_stride(surface) * surface_height(surface),
- DIRTY_MEMORY_VGA);
- }
}
static void vmsvga_reset(DeviceState *dev)