From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fdaod-0003fr-Uv for qemu-devel@nongnu.org; Tue, 09 May 2006 18:36:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fdaob-0003dk-4a for qemu-devel@nongnu.org; Tue, 09 May 2006 18:36:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fdaoa-0003dW-UJ for qemu-devel@nongnu.org; Tue, 09 May 2006 18:36:24 -0400 Received: from [216.148.227.153] (helo=rwcrmhc13.comcast.net) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdYqu-0006mT-C4 for qemu-devel@nongnu.org; Tue, 09 May 2006 16:30:41 -0400 Message-ID: <4460FB9A.3060607@win4lin.com> Date: Tue, 09 May 2006 16:29:14 -0400 From: "Leonardo E. Reiter" MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH]Fix for minor video corruption under Windows References: <20060509195639.GB25376@los-vmm.sc.intel.com> In-Reply-To: <20060509195639.GB25376@los-vmm.sc.intel.com> Content-Type: multipart/mixed; boundary="------------030304040309070405080109" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org This is a multi-part message in MIME format. --------------030304040309070405080109 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Donald... thanks... I actually posted a patch to fix this sometime ago, but your patch seems more thorough and probably more correct. Just FYI, I attached my patch again. I will test your patch as well. Thanks again, Leo Reiter Donald D. Dugger wrote: > If you change the video resolution while running a Windows XP image such that > it uses fewer bytes of VRAM (either by using fewer bytes per pixel or by > lowering the resolution) then some window backgrounds will become corrupted. > This happens because the Windows XP Cirrus Logic driver assumes that VRAM is > initialized to 0xff whenever the video mode switches between VGA and SVGA. > > This patch fixes this problem by resetting VRAM whenever a VGA/SVGA mode switch > occurs. > > Signed-off-by: Donald.D.Dugger@intel.com > -- Leonardo E. Reiter Vice President of Product Development, CTO Win4Lin, Inc. Virtual Computing that means Business Main: +1 512 339 7979 Fax: +1 512 532 6501 http://www.win4lin.com --------------030304040309070405080109 Content-Type: text/x-patch; name="qemu-cirrus_vga-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="qemu-cirrus_vga-fix.patch" Index: hw/vga.c =================================================================== RCS file: /cvsroot/qemu/qemu/hw/vga.c,v retrieving revision 1.42 diff -a -u -r1.42 vga.c --- hw/vga.c 9 Apr 2006 01:06:34 -0000 1.42 +++ hw/vga.c 12 Apr 2006 14:53:06 -0000 @@ -1366,6 +1366,8 @@ if (disp_width != s->last_width || height != s->last_height) { + if (cirrus_vga_enabled && s->get_bpp(s) >= 8) + memset(s->vram_ptr, 0xff, s->vram_size); dpy_resize(s->ds, disp_width, height); s->last_scr_width = disp_width; s->last_scr_height = height; --------------030304040309070405080109--