linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
Subject: Re: logos work/apply when?
Date: Fri, 13 Jul 2007 07:50:51 +0800	[thread overview]
Message-ID: <1184284251.4566.3.camel@daplas> (raw)
In-Reply-To: <20070712130822.a8269fe0.rdunlap@xenotime.net>

[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]

On Thu, 2007-07-12 at 13:08 -0700, Randy Dunlap wrote: 
> Hi,
> 
> Is there some kernel config or video config (possibly set at boot time
> via vga=xyz or video=wxy) where one or more of the logos is not
> applicable?  or the other way:  are there certain kernel or video
> configs where only certain logos are applicable?
> 
> 
> I've tested vesafb with LOGO_LINUX_VGA16 but I can't see the logo.
> I do see an empty space for it at the top of the screen area, however.
> (booting with vga=0x317 in /etc/lilo.conf file)
> 
> When I use LOGO_LINUX_CLUT224 instead, I do see the logo.
> 
> or when I use FB_VGA16 instead of vesafb and also use LOGO_LINUX_VGA16,
> I can see the logo.
> 
> I'm just trying to understand when/why I should expect (or not expect)
> to see a logo (if it is enabled).

It's a bug. And I've been wanting to fix that for some time. Logo's with
depths <= the fb depth should still be shown. The problem is that VGA16
and monochrome logos do not contain color information, so we have to use
the console palette (and not create a new one). Try the attached patch.

Tony  


[-- Attachment #2: fb_logo.diff --]
[-- Type: text/x-patch, Size: 1589 bytes --]

diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 7f3a0cc..b6a0a1c 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -244,8 +244,17 @@ static void fb_set_logo(struct fb_info *
 	u8 xor = (info->fix.visual == FB_VISUAL_MONO01) ? 0xff : 0;
 	u8 fg = 1, d;
 
-	if (fb_get_color_depth(&info->var, &info->fix) == 3)
-		fg = 7;
+	switch (fb_get_color_depth(&info->var, &info->fix)) {
+	case 1:
+		fg = 1;
+		break;
+	case 2:
+		fg = 3;
+		break;
+	default:
+		fg = 7; 
+		break;
+	}
 
 	if (info->fix.visual == FB_VISUAL_MONO01 ||
 	    info->fix.visual == FB_VISUAL_MONO10)
@@ -428,21 +437,6 @@ int fb_prepare_logo(struct fb_info *info
 		depth = 4;
 	}
 
-	if (depth >= 8) {
-		switch (info->fix.visual) {
-		case FB_VISUAL_TRUECOLOR:
-			fb_logo.needs_truepalette = 1;
-			break;
-		case FB_VISUAL_DIRECTCOLOR:
-			fb_logo.needs_directpalette = 1;
-			fb_logo.needs_cmapreset = 1;
-			break;
-		case FB_VISUAL_PSEUDOCOLOR:
-			fb_logo.needs_cmapreset = 1;
-			break;
-		}
-	}
-
 	/* Return if no suitable logo was found */
 	fb_logo.logo = fb_find_logo(depth);
 
@@ -467,6 +461,22 @@ int fb_prepare_logo(struct fb_info *info
 		fb_logo.depth = 4;
 	else
 		fb_logo.depth = 1;		
+
+	if (fb_logo.depth > 4 && depth >= 8) {
+		switch (info->fix.visual) {
+		case FB_VISUAL_TRUECOLOR:
+			fb_logo.needs_truepalette = 1;
+			break;
+		case FB_VISUAL_DIRECTCOLOR:
+			fb_logo.needs_directpalette = 1;
+			fb_logo.needs_cmapreset = 1;
+			break;
+		case FB_VISUAL_PSEUDOCOLOR:
+			fb_logo.needs_cmapreset = 1;
+			break;
+		}
+	}
+
 	return fb_logo.logo->height;
 }
 

[-- Attachment #3: Type: text/plain, Size: 286 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

[-- Attachment #4: Type: text/plain, Size: 182 bytes --]

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

  reply	other threads:[~2007-07-12 23:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-12 20:08 logos work/apply when? Randy Dunlap
2007-07-12 23:50 ` Antonino A. Daplas [this message]
2007-07-13 18:06   ` Randy Dunlap
2007-07-13 22:49     ` Antonino A. Daplas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1184284251.4566.3.camel@daplas \
    --to=adaplas@gmail.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=rdunlap@xenotime.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).