mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
fbdev: fix 1bpp logo for unusual width
This check is needed in the case where the width of the framebuffer is not a multiple of 8 pixels. For example, LEGO MINDSTORMS EV3 has a 178x128 1bpp display. Signed-off-by: David Lechner <[email protected]> Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>
This commit is contained in:
parent
b0d8e409c3
commit
16622a8e7e
1 changed files with 1 additions and 1 deletions
|
|
@ -316,7 +316,7 @@ static void fb_set_logo(struct fb_info *info,
|
|||
for (i = 0; i < logo->height; i++) {
|
||||
for (j = 0; j < logo->width; src++) {
|
||||
d = *src ^ xor;
|
||||
for (k = 7; k >= 0; k--) {
|
||||
for (k = 7; k >= 0 && j < logo->width; k--) {
|
||||
*dst++ = ((d >> k) & 1) ? fg : 0;
|
||||
j++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue