From e090e4a5493aeab2d9d41dedebb37d6c2e518ca0 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 28 Feb 2012 12:53:16 +0100 Subject: [PATCH 3/7] Move graphic-related coalesced MMIO flushes to affected device models RH-Author: Paolo Bonzini Message-id: <1330433598-21534-4-git-send-email-pbonzini@redhat.com> Patchwork-id: 37670 O-Subject: [RHEL 6.3 qemu-kvm PATCH 3/5] Move graphic-related coalesced MMIO flushes to affected device models Bugzilla: 796575 RH-Acked-by: Alex Williamson RH-Acked-by: Laszlo Ersek RH-Acked-by: Markus Armbruster From: Jan Kiszka This is conceptually cleaner and will allow us to drop the nographic timer. Moreover, it will be mandatory to fully exploit future per-device coalesced MMIO rings. Signed-off-by: Jan Kiszka Signed-off-by: Blue Swirl (cherry picked from commit e9a07334fb6ee08ddd61787c102d36e7e781efef) Signed-off-by: Paolo Bonzini --- hw/g364fb.c | 4 ++++ hw/vga.c | 4 ++++ vl.c | 2 -- 3 files changed, 8 insertions(+), 2 deletions(-) Signed-off-by: Michal Novotny --- hw/g364fb.c | 4 ++++ hw/vga.c | 4 ++++ vl.c | 2 -- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/g364fb.c b/hw/g364fb.c index 3c8fb98..885d578 100644 --- a/hw/g364fb.c +++ b/hw/g364fb.c @@ -250,6 +250,8 @@ static void g364fb_update_display(void *opaque) { G364State *s = opaque; + qemu_flush_coalesced_mmio_buffer(); + if (s->width == 0 || s->height == 0) return; @@ -303,6 +305,8 @@ static void g364fb_screen_dump(void *opaque, const char *filename) uint8_t *data_buffer; FILE *f; + qemu_flush_coalesced_mmio_buffer(); + if (s->depth != 8) { BADF("unknown guest depth %d\n", s->depth); return; diff --git a/hw/vga.c b/hw/vga.c index edafc89..db40065 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -1919,6 +1919,8 @@ static void vga_update_display(void *opaque) VGACommonState *s = opaque; int full_update, graphic_mode; + qemu_flush_coalesced_mmio_buffer(); + if (ds_get_bits_per_pixel(s->ds) == 0) { /* nothing to do */ } else { @@ -2048,6 +2050,8 @@ static void vga_update_text(void *opaque, console_ch_t *chardata) char msg_buffer[80]; int full_update = 0; + qemu_flush_coalesced_mmio_buffer(); + if (!(s->ar_index & 0x20)) { graphic_mode = GMODE_BLANK; } else { diff --git a/vl.c b/vl.c index 9fc8912..9ff9910 100644 --- a/vl.c +++ b/vl.c @@ -3205,7 +3205,6 @@ static void gui_update(void *opaque) DisplayState *ds = opaque; DisplayChangeListener *dcl = ds->listeners; - qemu_flush_coalesced_mmio_buffer(); dpy_refresh(ds); while (dcl != NULL) { @@ -3221,7 +3220,6 @@ static void nographic_update(void *opaque) { uint64_t interval = GUI_REFRESH_INTERVAL; - qemu_flush_coalesced_mmio_buffer(); qemu_mod_timer(nographic_timer, interval + qemu_get_clock(rt_clock)); } -- 1.7.7.6