* [Qemu-devel] [PATCH] Revert "qxl: set mm_time in vga update"
@ 2011-08-01 10:21 Alon Levy
2011-08-03 9:54 ` Gerd Hoffmann
0 siblings, 1 reply; 2+ messages in thread
From: Alon Levy @ 2011-08-01 10:21 UTC (permalink / raw)
To: qemu-devel; +Cc: kraxel
This reverts commit 22795174a37e02200944c0d093d518e832650686.
Without this patch the windows logo animation during boot time was
correct, with it it jumps backwards and forwards erratically.
---
ui/spice-display.c | 5 -----
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/ui/spice-display.c b/ui/spice-display.c
index 683d454..91b1cfc 100644
--- a/ui/spice-display.c
+++ b/ui/spice-display.c
@@ -134,7 +134,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;
@@ -161,10 +160,6 @@ 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->u.copy.rop_descriptor = SPICE_ROPD_OP_PUT;
drawable->u.copy.src_bitmap = (intptr_t)image;
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] Revert "qxl: set mm_time in vga update"
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
0 siblings, 0 replies; 2+ messages in thread
From: Gerd Hoffmann @ 2011-08-03 9:54 UTC (permalink / raw)
To: Alon Levy; +Cc: qemu-devel
[-- 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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-03 9:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).