diff options
author | Antonino A. Daplas <adaplas@gmail.com> | 2006-03-31 05:31:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-31 15:19:00 -0500 |
commit | a536093a2f07007aa572e922752b7491b9ea8ff2 (patch) | |
tree | 72f1036242f91ac77fbeb6b41c633af76e3d7358 /drivers/video/cfbimgblt.c | |
parent | 2cbbb3b59c3ccdc55ad0c924fb49e09a962bb517 (diff) |
[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>
Diffstat (limited to 'drivers/video/cfbimgblt.c')
-rw-r--r-- | drivers/video/cfbimgblt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/cfbimgblt.c b/drivers/video/cfbimgblt.c index 910e2338a27e..8ba6152db2fd 100644 --- a/drivers/video/cfbimgblt.c +++ b/drivers/video/cfbimgblt.c | |||
@@ -169,7 +169,7 @@ static inline void slow_imageblit(const struct fb_image *image, struct fb_info * | |||
169 | 169 | ||
170 | while (j--) { | 170 | while (j--) { |
171 | l--; | 171 | l--; |
172 | color = (*s & 1 << (FB_BIT_NR(l))) ? fgcolor : bgcolor; | 172 | color = (*s & (1 << l)) ? fgcolor : bgcolor; |
173 | val |= FB_SHIFT_HIGH(color, shift); | 173 | val |= FB_SHIFT_HIGH(color, shift); |
174 | 174 | ||
175 | /* Did the bitshift spill bits to the next long? */ | 175 | /* Did the bitshift spill bits to the next long? */ |