From: Gerd Hoffmann <kraxel@redhat.com>
To: Alon Levy <alevy@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Revert "qxl: set mm_time in vga update"
Date: Wed, 03 Aug 2011 11:54:52 +0200 [thread overview]
Message-ID: <4E391AEC.5070903@redhat.com> (raw)
In-Reply-To: <1312194101-9433-1-git-send-email-alevy@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 473 bytes --]
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
[-- Attachment #2: mm-clock.diff --]
[-- Type: text/plain, Size: 2066 bytes --]
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;
prev parent reply other threads:[~2011-08-03 9:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-01 10:21 [Qemu-devel] [PATCH] Revert "qxl: set mm_time in vga update" Alon Levy
2011-08-03 9:54 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E391AEC.5070903@redhat.com \
--to=kraxel@redhat.com \
--cc=alevy@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).