From: Antonino A. Daplas Date: Fri, 9 Sep 2005 20:10:01 +0000 (-0700) Subject: [PATCH] nvidiafb: Fixed mirrored characters in big endian machines X-Git-Tag: upstream/snapshot3+hdmi~46149 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7c1cd6fd5efeb95603e37f35b5da293b452d8b64;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [PATCH] nvidiafb: Fixed mirrored characters in big endian machines nvidiafb_imageblit converts the bitdata stream from big_endian to little endian. This produces mirrored characters when machine is big_endian. Do not endian convert on big endian machines. Signed-off-by: Antonino Daplas Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/nvidia/nv_local.h b/drivers/video/nvidia/nv_local.h index 9da3209..afee284 100644 --- a/drivers/video/nvidia/nv_local.h +++ b/drivers/video/nvidia/nv_local.h @@ -95,6 +95,7 @@ #define READ_GET(par) (NV_RD32(&(par)->FIFO[0x0011], 0) >> 2) +#ifdef __LITTLE_ENDIAN #define reverse_order(l) \ do { \ u8 *a = (u8 *)(l); \ @@ -103,5 +104,8 @@ do { \ *a = byte_rev[*a], a++; \ *a = byte_rev[*a]; \ } while(0) +#else +#define reverse_order(l) +#endif /* __LITTLE_ENDIAN */ #endif /* __NV_LOCAL_H__ */