From: Ian Jackson Date: Fri, 24 Oct 2008 18:09:49 +0000 (+0100) Subject: vga.c: Call dpy_update when stealing vram X-Git-Tag: t.master-before-merge~60 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ffa53894c6e2f61539f910f6fe2c465a6194f266;p=qemu-xen-4.2-testing.git vga.c: Call dpy_update when stealing vram 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 --- diff --git a/hw/vga.c b/hw/vga.c index 68ea75c91..f2ce4feff 100644 --- 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 */