]> xenbits.xensource.com Git - qemu-xen-4.3-testing.git/commitdiff
vga.c: Call dpy_update when stealing vram
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 24 Oct 2008 18:09:49 +0000 (19:09 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Fri, 24 Oct 2008 18:09:49 +0000 (19:09 +0100)
When we steal the vram, we copy the old data into it.  It may be the
case that the display output is already running - eg a VNC client
already connected.  In this case it is necessary to call dpy_update to
ensure that the data is sent to the client.

Without this change the initial screen clearing (done by the BIOS
before vram is stole) may be missed if the vnc client is fast at VM
startup, resulting in a white vnc screen with bits of black-backed
text painted over (which can be rectified by asking for a screen
refresh).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
hw/vga.c

index 68ea75c91ae460dabbfdfe8920af66622ed352bf..f2ce4feff6a25b2a3112e6e9676a354edd695e74 100644 (file)
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -2402,6 +2402,7 @@ void xen_vga_vram_map(uint64_t vram_addr, int copy)
     xen_pfn_t *pfn_list;
     int i;
     void *vram;
+    DisplayState *ds;
 
     fprintf(logfile, "mapping video RAM from %llx\n",
            (unsigned long long)vram_addr);
@@ -2443,6 +2444,10 @@ void xen_vga_vram_map(uint64_t vram_addr, int copy)
 #ifdef CONFIG_STUBDOM
     xenfb_pv_display_start(vram);
 #endif
+    /* If some display is already working, we need to update it now */
+    ds= xen_vga_state->ds;
+    if (ds) 
+        dpy_update(ds, 0,0, ds->width,ds->height);
 }
 
 /* Called at boot time when the BIOS has allocated video RAM */