* [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
* Re: [Qemu-devel] [PATCH] Fix VGA for MIPS Malta (big endian)
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>
1 sibling, 0 replies; 3+ messages in thread
From: Blue Swirl @ 2008-07-20 15:27 UTC (permalink / raw)
To: qemu-devel
On 7/20/08, Stefan Weil <berlios@weilnetz.de> wrote:
> 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?
Sparc64 uses VGA and the display is OK, but only in text mode so far.
And there is a lot of byte swapping going on (or should be going on)
so I wouldn't use that as a reference.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH] Fix VGA for MIPS Malta (big endian)
[not found] ` <90edad820810180438r65fa6a14o9776e3f00bee4173@mail.gmail.com>
@ 2008-10-18 12:47 ` Anton Salikhmetov
0 siblings, 0 replies; 3+ messages in thread
From: Anton Salikhmetov @ 2008-10-18 12:47 UTC (permalink / raw)
To: qemu-devel; +Cc: berlios
> ---------- Forwarded message ----------
> From: Stefan Weil <berlios@weilnetz.de>
> Date: 2008/7/20
> Subject: [Qemu-devel] [PATCH] Fix VGA for MIPS Malta (big endian)
> To: QEMU Developers <qemu-devel@nongnu.org>
>
>
> 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
>
Hello,
I have a project requiring the VGA support in qemu-system-mips (MIPS,
32-bit, BE), and the suggested solution works for me. Without the
proposed patch the picture in Qemu's SDL window is distorted and VGA
support in Qemu is unusable, at least, for the MIPS 32-bit BE
architecture. Hope this patch is going to be restricted to MIPS and
32-bit and committed to the repository. Thanks.
Anton
^ 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).