aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2009-01-06 17:42:37 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:27 -0500
commit4fb6de2561d5c47f3539a7b412108164d79fbb96 (patch)
tree69404556536c60d0fec260f5d95ecfafe73e55bb
parentc00b1b7d19d335f96aa03ef2e4e71b7fb4fdb056 (diff)
fbdev/logo: check compatibility of main and extra logos
The code to draw penguin logos always uses some properties of the main logo. This is incorrect if additional logos (CONFIG_FB_LOGO_EXTRA=y) have different types than the main logo, which causes corrupted logo images. http://bugzilla.kernel.org/show_bug.cgi?id=12181 Hence skip additional logos that are not compatible with the main logo. Technically, it's possible to draw multiple logos of different types on truecolor displays, but this would complicate the (already quite complicated) logo drawing code even more. This patch fixes a problem with Debian's linux-image-2.6.26-1-powerpc64 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=508173 Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/video/fbmem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 3c65b0d67617..756efeb91abc 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -510,6 +510,10 @@ static int fb_prepare_extra_logos(struct fb_info *info, unsigned int height,
510 fb_logo_ex_num = 0; 510 fb_logo_ex_num = 0;
511 511
512 for (i = 0; i < fb_logo_ex_num; i++) { 512 for (i = 0; i < fb_logo_ex_num; i++) {
513 if (fb_logo_ex[i].logo->type != fb_logo.logo->type) {
514 fb_logo_ex[i].logo = NULL;
515 continue;
516 }
513 height += fb_logo_ex[i].logo->height; 517 height += fb_logo_ex[i].logo->height;
514 if (height > yres) { 518 if (height > yres) {
515 height -= fb_logo_ex[i].logo->height; 519 height -= fb_logo_ex[i].logo->height;