Thread (3 messages) 3 messages, 2 authors, 2007-12-27

pm2fb: big endian fix

From: Krzysztof Helt <hidden>
Date: 2007-12-24 10:55:46

From: Krzysztof Helt <redacted>

This patch fixes garbled letters on big endian
machines with acceleration enabled.

Signed-off-by: Krzysztof Helt <redacted>

---
--- linux-ref/drivers/video/pm2fb.c	2007-12-23 20:39:09.000000000 +0100
+++ linux-new/drivers/video/pm2fb.c	2007-12-24 00:41:32.000000000 +0100
@@ -1210,7 +1210,11 @@ static void pm2fb_imageblit(struct fb_in
 			PM2F_INCREASE_X | PM2F_INCREASE_Y);
 		/* BitMapPackEachScanline & invert bits and byte order*/
 		/* force background */
+#ifdef __LITTLE_ENDIAN
 		pm2_WR(par, PM2R_RASTERIZER_MODE,  (1 << 9) | 1 | (3 << 7));
+#else
+		pm2_WR(par, PM2R_RASTERIZER_MODE,  (1 << 9) | 1);
+#endif
 		pm2_WR(par, PM2R_CONSTANT_COLOR, fgx);
 		pm2_WR(par, PM2R_RENDER,
 			PM2F_RENDER_RECTANGLE |
@@ -1225,7 +1229,11 @@ static void pm2fb_imageblit(struct fb_in
 			PM2F_RENDER_FASTFILL |
 			PM2F_INCREASE_X | PM2F_INCREASE_Y);
 		/* invert bits and byte order*/
+#ifdef __LITTLE_ENDIAN
 		pm2_WR(par, PM2R_RASTERIZER_MODE,  1 | (3 << 7));
+#else
+		pm2_WR(par, PM2R_RASTERIZER_MODE,  1);
+#endif
 		pm2_WR(par, PM2R_FB_BLOCK_COLOR, fgx);
 		pm2_WR(par, PM2R_RENDER,
 			PM2F_RENDER_RECTANGLE |

----------------------------------------------------------------------
Bedac w toalecie korzystala z ...
quoted
quoted
  http://link.interia.pl/f1cbc

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help