From: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
To: "Antonino A. Daplas" <adaplas@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: linux-fbdev-devel@lists.sourceforge.net,
Geoff Levand <geoffrey.levand@am.sony.com>,
Arnd Bergmann <arnd@arndb.de>,
linux-kernel@vger.kernel.org,
Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>,
James Simmons <jsimmons@infradead.org>,
cbe-oss-dev@ozlabs.org
Subject: [patch 1/4] fbdev: extract fb_show_logo_line()
Date: Tue, 10 Jul 2007 14:27:03 +0200 [thread overview]
Message-ID: <20070710123540.579000000@pademelon.sonytel.be> (raw)
In-Reply-To: 20070710122702.765654000@pademelon.sonytel.be
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: spe-logo/fb_show_logo_line.diff --]
[-- Type: text/plain, Size: 3986 bytes --]
Extract the code to draw one line of logos into fb_show_logo_line()
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Acked-By: James Simmons <jsimmons@infradead.org>
---
drivers/video/fbmem.c | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -477,22 +477,24 @@ int fb_prepare_logo(struct fb_info *info
return fb_logo.logo->height;
}
-int fb_show_logo(struct fb_info *info, int rotate)
+static int fb_show_logo_line(struct fb_info *info, int rotate,
+ const struct linux_logo *logo, int y,
+ unsigned int n)
{
u32 *palette = NULL, *saved_pseudo_palette = NULL;
unsigned char *logo_new = NULL, *logo_rotate = NULL;
struct fb_image image;
/* Return if the frame buffer is not mapped or suspended */
- if (fb_logo.logo == NULL || info->state != FBINFO_STATE_RUNNING ||
+ if (logo == NULL || info->state != FBINFO_STATE_RUNNING ||
info->flags & FBINFO_MODULE)
return 0;
image.depth = 8;
- image.data = fb_logo.logo->data;
+ image.data = logo->data;
if (fb_logo.needs_cmapreset)
- fb_set_logocmap(info, fb_logo.logo);
+ fb_set_logocmap(info, logo);
if (fb_logo.needs_truepalette ||
fb_logo.needs_directpalette) {
@@ -501,17 +503,16 @@ int fb_show_logo(struct fb_info *info, i
return 0;
if (fb_logo.needs_truepalette)
- fb_set_logo_truepalette(info, fb_logo.logo, palette);
+ fb_set_logo_truepalette(info, logo, palette);
else
- fb_set_logo_directpalette(info, fb_logo.logo, palette);
+ fb_set_logo_directpalette(info, logo, palette);
saved_pseudo_palette = info->pseudo_palette;
info->pseudo_palette = palette;
}
if (fb_logo.depth <= 4) {
- logo_new = kmalloc(fb_logo.logo->width * fb_logo.logo->height,
- GFP_KERNEL);
+ logo_new = kmalloc(logo->width * logo->height, GFP_KERNEL);
if (logo_new == NULL) {
kfree(palette);
if (saved_pseudo_palette)
@@ -519,29 +520,35 @@ int fb_show_logo(struct fb_info *info, i
return 0;
}
image.data = logo_new;
- fb_set_logo(info, fb_logo.logo, logo_new, fb_logo.depth);
+ fb_set_logo(info, logo, logo_new, fb_logo.depth);
}
image.dx = 0;
- image.dy = 0;
- image.width = fb_logo.logo->width;
- image.height = fb_logo.logo->height;
+ image.dy = y;
+ image.width = logo->width;
+ image.height = logo->height;
if (rotate) {
- logo_rotate = kmalloc(fb_logo.logo->width *
- fb_logo.logo->height, GFP_KERNEL);
+ logo_rotate = kmalloc(logo->width *
+ logo->height, GFP_KERNEL);
if (logo_rotate)
fb_rotate_logo(info, logo_rotate, &image, rotate);
}
- fb_do_show_logo(info, &image, rotate, num_online_cpus());
+ fb_do_show_logo(info, &image, rotate, n);
kfree(palette);
if (saved_pseudo_palette != NULL)
info->pseudo_palette = saved_pseudo_palette;
kfree(logo_new);
kfree(logo_rotate);
- return fb_logo.logo->height;
+ return logo->height;
+}
+
+int fb_show_logo(struct fb_info *info, int rotate)
+{
+ return fb_show_logo_line(info, rotate, fb_logo.logo, 0,
+ num_online_cpus());
}
#else
int fb_prepare_logo(struct fb_info *info, int rotate) { return 0; }
--
With kind regards,
Geert Uytterhoeven
Software Architect
Sony Network and Software Technology Center Europe
The Corporate Village ������ Da Vincilaan 7-D1 ������ B-1935 Zaventem ������ Belgium
Phone: +32 (0)2 700 8453
Fax: +32 (0)2 700 8622
E-mail: Geert.Uytterhoeven@sonycom.com
Internet: http://www.sony-europe.com/
Sony Network and Software Technology Center Europe
A division of Sony Service Centre (Europe) N.V.
Registered office: Technologielaan 7 ������ B-1840 Londerzeel ������ Belgium
VAT BE 0413.825.160 ������ RPR Brussels
Fortis Bank Zaventem ������ Swift GEBABEBB08A ������ IBAN BE39001382358619
[-- Attachment #2: 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 #3: 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
next prev parent reply other threads:[~2007-07-10 12:36 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 12:27 [patch 0/4] Cell SPE logos Geert Uytterhoeven
2007-07-10 12:27 ` Geert Uytterhoeven [this message]
2007-07-10 12:27 ` [patch 2/4] fbdev: Add fb_append_extra_logo() Geert Uytterhoeven
2007-07-13 0:15 ` Antonino A. Daplas
2007-07-13 6:56 ` Geert Uytterhoeven
2007-07-13 11:45 ` Antonino A. Daplas
2007-07-13 12:02 ` Geert Uytterhoeven
2007-07-13 6:58 ` Geert Uytterhoeven
2007-07-13 11:53 ` Antonino A. Daplas
2007-07-10 12:27 ` [patch 3/4] fbdev: SPE helper penguin logo Geert Uytterhoeven
2007-07-10 12:27 ` [patch 4/4] Cell: Draw SPE helper penguin logos Geert Uytterhoeven
2007-07-10 16:54 ` [Cbe-oss-dev] " Arnd Bergmann
2007-07-12 23:06 ` [patch 0/4] Cell SPE logos Andrew Morton
2007-07-13 8:52 ` Geert Uytterhoeven
2007-07-13 9:06 ` Andrew Morton
2007-07-13 9:09 ` Geert Uytterhoeven
2007-07-13 12:30 ` Benjamin Herrenschmidt
2007-07-13 10:05 ` [Cbe-oss-dev] " Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2007-07-16 13:55 Geert Uytterhoeven
2007-07-16 13:55 ` [patch 1/4] fbdev: extract fb_show_logo_line() Geert Uytterhoeven
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=20070710123540.579000000@pademelon.sonytel.be \
--to=geert.uytterhoeven@sonycom.com \
--cc=adaplas@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=cbe-oss-dev@ozlabs.org \
--cc=geoffrey.levand@am.sony.com \
--cc=jsimmons@infradead.org \
--cc=linux-fbdev-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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).