From: "Leonardo E. Reiter" <lreiter@win4lin.com>
To: QEMU Developer Mailing List <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] partial fix for cirrus_vga mode switch corruption...
Date: Thu, 02 Feb 2006 13:45:05 -0500 [thread overview]
Message-ID: <43E25331.9090903@win4lin.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1174 bytes --]
The attached patch corrects display mode switch corruption in Windows
2000 and XP guests when using cirrus_vga. I'm not sure it's correct and
it's certainly a hack, but apparently win2k/xp are expecting the video
RAM to be reset to all 1's after mode switches. After lots of trial and
error, I discovered that setting the vram to all 1's should only be done
on mode switches to 8bpp or higher depth.
The only drawback to applying this patch as is, is that when switching
back from the monitor, the Windows guest's screen will be reset to solid
white. Using the monitor in graphics mode is not a priority for me, but
it should be easy to put a check in the code to avoid the memset() if
the user is switching back from the monitor rather than Windows itself
doing a mode switch.
I've found that on rare occasion, even with this patch, mode switches
still cause display corruption. For the most part however, the attached
hack does the job.
Regards,
Leo Reiter
--
Leonardo E. Reiter
Vice President of Product Development, CTO
Win4Lin, Inc.
Virtual Computing from Desktop to Data Center
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.41
diff -a -u -r1.41 vga.c
--- hw/vga.c 3 Jul 2005 14:00:51 -0000 1.41
+++ hw/vga.c 27 Jan 2006 20:42:31 -0000
@@ -1364,6 +1364,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-02-02 18:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=43E25331.9090903@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).