qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Fix VGA for MIPS Malta (big endian)
@ 2008-07-20 14:28 Stefan Weil
  2008-07-20 15:27 ` Blue Swirl
       [not found] ` <90edad820810180438r65fa6a14o9776e3f00bee4173@mail.gmail.com>
  0 siblings, 2 replies; 3+ messages in thread
From: Stefan Weil @ 2008-07-20 14:28 UTC (permalink / raw)
  To: QEMU Developers

[-- 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;
     }

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-10-18 12:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-20 14:28 [Qemu-devel] [PATCH] Fix VGA for MIPS Malta (big endian) Stefan Weil
2008-07-20 15:27 ` Blue Swirl
     [not found] ` <90edad820810180438r65fa6a14o9776e3f00bee4173@mail.gmail.com>
2008-10-18 12:47   ` Anton Salikhmetov

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).