Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bc9c6a175fa8123587668c38959a105e3ccb6bbd
Commit:     bc9c6a175fa8123587668c38959a105e3ccb6bbd
Parent:     a782eed655de49faa4895ae6143c3891985e4d98
Author:     Krzysztof Helt <[EMAIL PROTECTED]>
AuthorDate: Wed Feb 6 01:39:37 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Feb 6 10:41:17 2008 -0800

    pm2fb: big endian fix
    
    Fix garbled letters on big endian machines with acceleration enabled.
    
    This makes pm2fb works fine with full acceleration on sparc machine (card
    known as Sun PGX-32 or TechSource Raptor GFX-8P).
    
    Signed-off-by: Krzysztof Helt <[EMAIL PROTECTED]>
    Cc: Geert Uytterhoeven <[EMAIL PROTECTED]>
    Cc: "David S. Miller" <[EMAIL PROTECTED]>
    Cc: "Antonino A. Daplas" <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/video/pm2fb.c |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/video/pm2fb.c b/drivers/video/pm2fb.c
index 5591dfb..30181b5 100644
--- a/drivers/video/pm2fb.c
+++ b/drivers/video/pm2fb.c
@@ -1159,6 +1159,11 @@ static void pm2fb_imageblit(struct fb_info *info, const 
struct fb_image *image)
        u32 fgx, bgx;
        const u32 *src = (const u32 *)image->data;
        u32 xres = (info->var.xres + 31) & ~31;
+       int raster_mode = 1; /* invert bits */
+
+#ifdef __LITTLE_ENDIAN
+       raster_mode |= 3 << 7; /* reverse byte order */
+#endif
 
        if (info->state != FBINFO_STATE_RUNNING)
                return;
@@ -1208,9 +1213,8 @@ static void pm2fb_imageblit(struct fb_info *info, const 
struct fb_image *image)
                pm2_WR(par, PM2R_RENDER,
                        PM2F_RENDER_RECTANGLE |
                        PM2F_INCREASE_X | PM2F_INCREASE_Y);
-               /* BitMapPackEachScanline & invert bits and byte order*/
-               /* force background */
-               pm2_WR(par, PM2R_RASTERIZER_MODE,  (1 << 9) | 1 | (3 << 7));
+               /* BitMapPackEachScanline */
+               pm2_WR(par, PM2R_RASTERIZER_MODE, raster_mode | (1 << 9));
                pm2_WR(par, PM2R_CONSTANT_COLOR, fgx);
                pm2_WR(par, PM2R_RENDER,
                        PM2F_RENDER_RECTANGLE |
@@ -1224,8 +1228,7 @@ static void pm2fb_imageblit(struct fb_info *info, const 
struct fb_image *image)
                        PM2F_RENDER_RECTANGLE |
                        PM2F_RENDER_FASTFILL |
                        PM2F_INCREASE_X | PM2F_INCREASE_Y);
-               /* invert bits and byte order*/
-               pm2_WR(par, PM2R_RASTERIZER_MODE,  1 | (3 << 7));
+               pm2_WR(par, PM2R_RASTERIZER_MODE, raster_mode);
                pm2_WR(par, PM2R_FB_BLOCK_COLOR, fgx);
                pm2_WR(par, PM2R_RENDER,
                        PM2F_RENDER_RECTANGLE |
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to