Commit a536093a2f07007aa572e922752b7491b9ea8ff2
Committed by
Linus Torvalds
1 parent
2cbbb3b59c
Exists in
master
and in
7 other branches
[PATCH] fbcon: Fix big-endian bogosity in slow_imageblit()
The monochrome->color expansion routine that handles bitmaps which have (widths % 8) != 0 (slow_imageblit) produces corrupt characters in big-endian. This is caused by a bogus bit test in slow_imageblit(). Fix. This patch may deserve to go to the stable tree. The code has already been well tested in little-endian machines. It's only in big-endian where there is uncertainty and Herbert confirmed that this is the correct way to go. It should not introduce regressions. Signed-off-by: Antonino Daplas <adaplas@pol.net> Acked-by: Herbert Poetzl <herbert@13thfloor.at> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Showing 2 changed files with 1 additions and 3 deletions Side-by-side Diff
drivers/video/cfbimgblt.c
include/linux/fb.h
... | ... | @@ -839,12 +839,10 @@ |
839 | 839 | #define FB_LEFT_POS(bpp) (32 - bpp) |
840 | 840 | #define FB_SHIFT_HIGH(val, bits) ((val) >> (bits)) |
841 | 841 | #define FB_SHIFT_LOW(val, bits) ((val) << (bits)) |
842 | -#define FB_BIT_NR(b) (7 - (b)) | |
843 | 842 | #else |
844 | 843 | #define FB_LEFT_POS(bpp) (0) |
845 | 844 | #define FB_SHIFT_HIGH(val, bits) ((val) << (bits)) |
846 | 845 | #define FB_SHIFT_LOW(val, bits) ((val) >> (bits)) |
847 | -#define FB_BIT_NR(b) (b) | |
848 | 846 | #endif |
849 | 847 | |
850 | 848 | /* |