From: "Antonino A. Daplas" <adaplas@hotpop.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Linux Fbdev development list <linux-fbdev-devel@lists.sourceforge.net>
Subject: [PATCH][FBDEV]: Find correct logo for directcolor < 24bpp
Date: Thu, 5 Aug 2004 07:53:01 +0800 [thread overview]
Message-ID: <200408050753.02074.adaplas@hotpop.com> (raw)
Hi Andrew,
Current algorithm does not choose correct logo type for directcolor < 24 bpp.
It chooses logo_224, but this is too deep for bpp < 24. This should fix the
problem.
Tony
Signed-off-by: Antonino Daplas <adaplas@pol.net>
---
fbmem.c | 31 ++++++++++++++++++++-----------
1 files changed, 20 insertions(+), 11 deletions(-)
diff -uprN linux-2.6.8-rc2-mm2-orig/drivers/video/fbmem.c linux-2.6.8-rc2-mm2/drivers/video/fbmem.c
--- linux-2.6.8-rc2-mm2-orig/drivers/video/fbmem.c 2004-08-04 23:37:26.339174664 +0000
+++ linux-2.6.8-rc2-mm2/drivers/video/fbmem.c 2004-08-04 23:37:40.785978416 +0000
@@ -734,26 +734,35 @@ static struct logo_data {
int fb_prepare_logo(struct fb_info *info)
{
+ int depth = fb_get_color_depth(info);
+
memset(&fb_logo, 0, sizeof(struct logo_data));
- switch (info->fix.visual) {
- case FB_VISUAL_TRUECOLOR:
- if (info->var.bits_per_pixel >= 8)
+ if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
+ depth = info->var.blue.length;
+ if (info->var.red.length < depth)
+ depth = info->var.red.length;
+ if (info->var.green.length < depth)
+ depth = info->var.green.length;
+ }
+
+ if (depth >= 8) {
+ switch (info->fix.visual) {
+ case FB_VISUAL_TRUECOLOR:
fb_logo.needs_truepalette = 1;
- break;
- case FB_VISUAL_DIRECTCOLOR:
- if (info->var.bits_per_pixel >= 24) {
+ 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;
}
- break;
- case FB_VISUAL_PSEUDOCOLOR:
- fb_logo.needs_cmapreset = 1;
- break;
}
/* Return if no suitable logo was found */
- fb_logo.logo = fb_find_logo(fb_get_color_depth(info));
+ fb_logo.logo = fb_find_logo(depth);
if (!fb_logo.logo || fb_logo.logo->height > info->var.yres) {
fb_logo.logo = NULL;
-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on
Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now,
one more big change to announce. We are now OSTG- Open Source Technology
Group. Come see the changes on the new OSTG site. www.ostg.com
reply other threads:[~2004-08-04 23:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200408050753.02074.adaplas@hotpop.com \
--to=adaplas@hotpop.com \
--cc=adaplas@pol.net \
--cc=akpm@osdl.org \
--cc=linux-fbdev-devel@lists.sourceforge.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).