From patchwork Fri Sep 30 10:31:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 117076 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 0431EB6F62 for ; Fri, 30 Sep 2011 20:31:48 +1000 (EST) Received: from localhost ([::1]:39729 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9aNZ-0002ys-98 for incoming@patchwork.ozlabs.org; Fri, 30 Sep 2011 06:31:41 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9aNP-0002xX-Mc for qemu-devel@nongnu.org; Fri, 30 Sep 2011 06:31:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R9aNO-0006q4-Dy for qemu-devel@nongnu.org; Fri, 30 Sep 2011 06:31:31 -0400 Received: from goliath.siemens.de ([192.35.17.28]:29827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R9aNN-0006pk-Vv for qemu-devel@nongnu.org; Fri, 30 Sep 2011 06:31:30 -0400 Received: from mail1.siemens.de (localhost [127.0.0.1]) by goliath.siemens.de (8.13.6/8.13.6) with ESMTP id p8UAVGKG008507; Fri, 30 Sep 2011 12:31:18 +0200 Received: from mchn199C.mchp.siemens.de ([139.25.109.49]) by mail1.siemens.de (8.13.6/8.13.6) with ESMTP id p8UAVEg3030120; Fri, 30 Sep 2011 12:31:15 +0200 Message-ID: <4E859A72.9040007@siemens.com> Date: Fri, 30 Sep 2011 12:31:14 +0200 From: Jan Kiszka User-Agent: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.8.1.12) Gecko/20080226 SUSE/2.0.0.12-1.1 Thunderbird/2.0.0.12 Mnenhy/0.7.5.666 MIME-Version: 1.0 To: Anthony Liguori , qemu-devel X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Received-From: 192.35.17.28 Cc: David Gibson Subject: [Qemu-devel] [PATCH 1/2] Move graphic-related coalesced MMIO flushes to affected device models X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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 b43341f..f00ee27 100644 --- a/hw/g364fb.c +++ b/hw/g364fb.c @@ -245,6 +245,8 @@ static void g364fb_update_display(void *opaque) { G364State *s = opaque; + qemu_flush_coalesced_mmio_buffer(); + if (s->width == 0 || s->height == 0) return; @@ -297,6 +299,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) { error_report("g364: unknown guest depth %d", s->depth); return; diff --git a/hw/vga.c b/hw/vga.c index f9a6014..8712269 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -1838,6 +1838,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 { @@ -1958,6 +1960,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 bd4a5ce..54d4dd9 100644 --- a/vl.c +++ b/vl.c @@ -1210,7 +1210,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) { @@ -1226,7 +1225,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_ms(rt_clock)); }