From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FeJyb-0003MU-GU for qemu-devel@nongnu.org; Thu, 11 May 2006 18:49:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FeJya-0003Lh-6g for qemu-devel@nongnu.org; Thu, 11 May 2006 18:49:44 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FeJyZ-0003LY-VE for qemu-devel@nongnu.org; Thu, 11 May 2006 18:49:43 -0400 Received: from [84.96.92.60] (helo=Smtp.neuf.fr) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FeK0B-0008J4-Ac for qemu-devel@nongnu.org; Thu, 11 May 2006 18:51:23 -0400 Received: from [84.102.211.146] by sp604001mt.gpm.neuf.ld (Sun Java System Messaging Server 6.2-5.05 (built Feb 16 2006)) with ESMTP id <0IZ400IW0I0C2OT0@sp604001mt.gpm.neuf.ld> for qemu-devel@nongnu.org; Fri, 12 May 2006 00:48:12 +0200 (CEST) Date: Fri, 12 May 2006 00:47:34 +0200 From: Fabrice Bellard Subject: Re: [Qemu-devel] [PATCH]Fix for minor video corruption under Windows In-reply-to: <7F740D512C7C1046AB53446D3720017307E75ED4@scsmsx402.amr.corp.intel.com> Message-id: <4463BF06.90001@bellard.org> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii; format=flowed Content-transfer-encoding: 7BIT References: <7F740D512C7C1046AB53446D3720017307E75ED4@scsmsx402.amr.corp.intel.com> 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 Hi, I think the proper fix must be done in the BIOS (set VRAM to 0xFF at cirrus mode init). I made a patch for that but I must test it a little more. Fabrice. Dugger, Donald D wrote: > Leo- > > Yeah, I started there but it turns out there are multiple reasons why > that is the wrong place to fix things: > > 1) `hw/vga.c' only knows about resolution changes, the bug also appears > if you change the pixel size, e.g. 24 bpp to 16 bpp. > > 2) Technically, because of the lazy screen update, your change would be > too late. To improve performance the vga code is only called > periodically, not after every VRAM change. It is theoretically possible > for the target to change video mode, assume VRAM got reset, do a bitblt > from non-visible VRAM to visible VRAM and then have the `hw/vga.c' code > get called, overwriting the changes done to visible VRAM. > > -- > Don Dugger > "Censeo Toto nos in Kansa esse decisse." - D. Gale > Donald.D.Dugger@intel.com > Ph: (303)440-1368 > > >>-----Original Message----- >>From: qemu-devel-bounces+donald.d.dugger=intel.com@nongnu.org >>[mailto:qemu-devel-bounces+donald.d.dugger=intel.com@nongnu.org >>] On Behalf Of Leonardo E. Reiter >>Sent: Tuesday, May 09, 2006 2:29 PM >>To: qemu-devel@nongnu.org >>Subject: Re: [Qemu-devel] [PATCH]Fix for minor video >>corruption under Windows >> >>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 >> > > > > _______________________________________________ > Qemu-devel mailing list > Qemu-devel@nongnu.org > http://lists.nongnu.org/mailman/listinfo/qemu-devel > >