From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:55126) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoYAD-0003VE-Tg for qemu-devel@nongnu.org; Wed, 03 Aug 2011 05:54:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QoYAC-0003ET-AX for qemu-devel@nongnu.org; Wed, 03 Aug 2011 05:54:57 -0400 Received: from mx1.redhat.com ([209.132.183.28]:21083) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QoYAC-0003EP-00 for qemu-devel@nongnu.org; Wed, 03 Aug 2011 05:54:56 -0400 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p739std6021226 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 3 Aug 2011 05:54:55 -0400 Message-ID: <4E391AEC.5070903@redhat.com> Date: Wed, 03 Aug 2011 11:54:52 +0200 From: Gerd Hoffmann MIME-Version: 1.0 References: <1312194101-9433-1-git-send-email-alevy@redhat.com> In-Reply-To: <1312194101-9433-1-git-send-email-alevy@redhat.com> Content-Type: multipart/mixed; boundary="------------020000030901010609070500" Subject: Re: [Qemu-devel] [PATCH] Revert "qxl: set mm_time in vga update" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy Cc: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------020000030901010609070500 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 08/01/11 12:21, Alon Levy wrote: > This reverts commit 22795174a37e02200944c0d093d518e832650686. > > Without this patch the windows logo animation during boot time was > correct, with it it jumps backwards and forwards erratically. Looking at how the x11 qxl driver generates mm_time I see it just grabs the timestamp from qxl rom, which in turn is filled by the spice server callback. So how about doing the same in vga mode (see patch, untested)? cheers, Gerd --------------020000030901010609070500 Content-Type: text/plain; name="mm-clock.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mm-clock.diff" diff --git a/hw/qxl.c b/hw/qxl.c index a6fb7f0..7be7c9a 100644 --- a/hw/qxl.c +++ b/hw/qxl.c @@ -319,6 +319,7 @@ static void interface_set_mm_time(QXLInstance *sin, uint32_t mm_time) qxl->shadow_rom.mm_clock = cpu_to_le32(mm_time); qxl->rom->mm_clock = cpu_to_le32(mm_time); + qxl->ssd.mm_clock = mm_time; qxl_rom_set_dirty(qxl); } diff --git a/ui/spice-display.c b/ui/spice-display.c index feeee73..e5f3093 100644 --- a/ui/spice-display.c +++ b/ui/spice-display.c @@ -70,7 +70,6 @@ static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd) QXLCommand *cmd; uint8_t *src, *dst; int by, bw, bh; - struct timespec time_space; if (qemu_spice_rect_is_empty(&ssd->dirty)) { return NULL; @@ -97,10 +96,7 @@ static SimpleSpiceUpdate *qemu_spice_create_update(SimpleSpiceDisplay *ssd) drawable->surfaces_dest[0] = -1; drawable->surfaces_dest[1] = -1; drawable->surfaces_dest[2] = -1; - clock_gettime(CLOCK_MONOTONIC, &time_space); - /* time in milliseconds from epoch. */ - drawable->mm_time = time_space.tv_sec * 1000 - + time_space.tv_nsec / 1000 / 1000; + drawable->mm_time = ssd->mm_clock; drawable->u.copy.rop_descriptor = SPICE_ROPD_OP_PUT; drawable->u.copy.src_bitmap = (intptr_t)image; @@ -290,8 +286,10 @@ static void interface_set_compression_level(QXLInstance *sin, int level) static void interface_set_mm_time(QXLInstance *sin, uint32_t mm_time) { + SimpleSpiceDisplay *ssd = container_of(sin, SimpleSpiceDisplay, qxl); + dprint(3, "%s:\n", __FUNCTION__); - /* nothing to do */ + ssd->mm_clock = mm_time; } static void interface_get_init_info(QXLInstance *sin, QXLDevInitInfo *info) diff --git a/ui/spice-display.h b/ui/spice-display.h index 2f95f68..68272e1 100644 --- a/ui/spice-display.h +++ b/ui/spice-display.h @@ -43,6 +43,7 @@ struct SimpleSpiceDisplay { QXLWorker *worker; QXLInstance qxl; uint32_t unique; + uint32_t mm_clock; QemuPfConv *conv; QXLRect dirty; --------------020000030901010609070500--