From: Stefan Weil <berlios@weilnetz.de>
To: QEMU Developers <qemu-devel@nongnu.org>
Subject: [Qemu-devel] [PATCH] Fix VGA for MIPS Malta (big endian)
Date: Sun, 20 Jul 2008 16:28:44 +0200 [thread overview]
Message-ID: <48834B9C.8010102@weilnetz.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 316 bytes --]
Hello,
this patch fixes the VGA display for MIPS Malta (big endian, 32 bit).
I have no tests for other big endian targets (32 or 64 bit).
Do they have a working VGA display (then my patch must be restricted
to MIPS and/or 32 bit), or do they show wrong pixel columns with current
Qemu trunk, too?
Regards
Stefan
[-- Attachment #2: vga_template.patch --]
[-- Type: text/x-diff, Size: 1051 bytes --]
Index: hw/vga_template.h
===================================================================
--- hw/vga_template.h (Revision 4908)
+++ hw/vga_template.h (Arbeitskopie)
@@ -327,6 +327,16 @@
palette = s1->last_palette;
width >>= 3;
for(x = 0; x < width; x++) {
+#if defined(TARGET_WORDS_BIGENDIAN)
+ ((PIXEL_TYPE *)d)[3] = palette[s[0]];
+ ((PIXEL_TYPE *)d)[2] = palette[s[1]];
+ ((PIXEL_TYPE *)d)[1] = palette[s[2]];
+ ((PIXEL_TYPE *)d)[0] = palette[s[3]];
+ ((PIXEL_TYPE *)d)[7] = palette[s[4]];
+ ((PIXEL_TYPE *)d)[6] = palette[s[5]];
+ ((PIXEL_TYPE *)d)[5] = palette[s[6]];
+ ((PIXEL_TYPE *)d)[4] = palette[s[7]];
+#else
((PIXEL_TYPE *)d)[0] = palette[s[0]];
((PIXEL_TYPE *)d)[1] = palette[s[1]];
((PIXEL_TYPE *)d)[2] = palette[s[2]];
@@ -335,6 +345,7 @@
((PIXEL_TYPE *)d)[5] = palette[s[5]];
((PIXEL_TYPE *)d)[6] = palette[s[6]];
((PIXEL_TYPE *)d)[7] = palette[s[7]];
+#endif
d += BPP * 8;
s += 8;
}
next reply other threads:[~2008-07-20 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-20 14:28 Stefan Weil [this message]
2008-07-20 15:27 ` [Qemu-devel] [PATCH] Fix VGA for MIPS Malta (big endian) Blue Swirl
[not found] ` <90edad820810180438r65fa6a14o9776e3f00bee4173@mail.gmail.com>
2008-10-18 12:47 ` Anton Salikhmetov
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=48834B9C.8010102@weilnetz.de \
--to=berlios@weilnetz.de \
--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).