All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Leonardo E. Reiter" <lreiter@win4lin.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH]Fix for minor video corruption under Windows
Date: Tue, 09 May 2006 16:29:14 -0400	[thread overview]
Message-ID: <4460FB9A.3060607@win4lin.com> (raw)
In-Reply-To: <20060509195639.GB25376@los-vmm.sc.intel.com>

[-- Attachment #1: Type: text/plain, Size: 980 bytes --]

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

[-- Attachment #2: qemu-cirrus_vga-fix.patch --]
[-- Type: text/x-patch, Size: 594 bytes --]

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;

  reply	other threads:[~2006-05-09 22:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-09 19:56 [Qemu-devel] [PATCH]Fix for minor video corruption under Windows Donald D. Dugger
2006-05-09 20:29 ` Leonardo E. Reiter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-05-09 23:12 Dugger, Donald D
2006-05-10 14:27 ` WaxDragon
2006-05-11 22:47 ` Fabrice Bellard
2006-05-10 16:17 Dugger, Donald D
2006-05-12  0:15 Dugger, Donald D

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4460FB9A.3060607@win4lin.com \
    --to=lreiter@win4lin.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.