From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KKZu5-0006gS-NN for qemu-devel@nongnu.org; Sun, 20 Jul 2008 10:28:49 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KKZu4-0006gD-CQ for qemu-devel@nongnu.org; Sun, 20 Jul 2008 10:28:49 -0400 Received: from [199.232.76.173] (port=47327 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KKZu4-0006g8-3Q for qemu-devel@nongnu.org; Sun, 20 Jul 2008 10:28:48 -0400 Received: from moutng.kundenserver.de ([212.227.126.188]:50940) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KKZu3-00025k-KK for qemu-devel@nongnu.org; Sun, 20 Jul 2008 10:28:47 -0400 Received: from localhost ([127.0.0.1] ident=stefan) by flocke.weilnetz.de with esmtp (Exim 4.69) (envelope-from ) id 1KKZu0-0001UW-Sp for qemu-devel@nongnu.org; Sun, 20 Jul 2008 16:28:44 +0200 Message-ID: <48834B9C.8010102@weilnetz.de> Date: Sun, 20 Jul 2008 16:28:44 +0200 From: Stefan Weil MIME-Version: 1.0 Subject: [Qemu-devel] [PATCH] Fix VGA for MIPS Malta (big endian) Content-Type: multipart/mixed; boundary="------------080102050806040108070300" Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers This is a multi-part message in MIME format. --------------080102050806040108070300 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit 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 --------------080102050806040108070300 Content-Type: text/x-diff; name="vga_template.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="vga_template.patch" 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; } --------------080102050806040108070300--