mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[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 <[email protected]> Acked-by: Herbert Poetzl <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
2cbbb3b59c
commit
a536093a2f
2 changed files with 1 additions and 3 deletions
|
|
@ -169,7 +169,7 @@ static inline void slow_imageblit(const struct fb_image *image, struct fb_info *
|
|||
|
||||
while (j--) {
|
||||
l--;
|
||||
color = (*s & 1 << (FB_BIT_NR(l))) ? fgcolor : bgcolor;
|
||||
color = (*s & (1 << l)) ? fgcolor : bgcolor;
|
||||
val |= FB_SHIFT_HIGH(color, shift);
|
||||
|
||||
/* Did the bitshift spill bits to the next long? */
|
||||
|
|
|
|||
Loading…
Reference in a new issue