The Cell Broadband Engine contains a 64-bit PowerPC core with 2 hardware
threads (called PPEs) and 8 Synergistic Processing Engines (called SPEs).
When booting Linux, 2 penguins logos are shown on the graphical console by
the standard frame buffer console logo code.
To emphasize the existence of the SPEs (which can be used under Linux), we
added a second row of (smaller) helper penguin logos, one for each SPE.
A sample screenshot can be found at
http://www.kernel.org/pub/linux/kernel/people/geoff/cell/debian-penguin-shot.png
(or on the ps3linux T-shirts we wore at OLS :-)
Summaries:
[1] fbdev: extract fb_show_logo_line()
[2] fbdev: Add fb_append_extra_logo()
[3] fbdev: SPE helper penguin logo
[4] Cell: Draw SPE helper penguin logos
Thanks for applying!
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
Extract the code to draw one line of logos into fb_show_logo_line()
Signed-off-by: Geert Uytterhoeven <redacted>
Signed-off-by: Geoff Levand <redacted>
Acked-By: James Simmons <redacted>
---
drivers/video/fbmem.c | 39 +++++++++++++++++++++++----------------
1 files changed, 23 insertions(+), 16 deletions(-)
@@ -477,22 +477,24 @@ int fb_prepare_logo(struct fb_info *inforeturnfb_logo.logo->height;}-intfb_show_logo(structfb_info*info,introtate)+staticintfb_show_logo_line(structfb_info*info,introtate,+conststructlinux_logo*logo,inty,+unsignedintn){u32*palette=NULL,*saved_pseudo_palette=NULL;unsignedchar*logo_new=NULL,*logo_rotate=NULL;structfb_imageimage;/* 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)return0;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, ireturn0;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, ireturn0;}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);-returnfb_logo.logo->height;+returnlogo->height;+}++intfb_show_logo(structfb_info*info,introtate)+{+returnfb_show_logo_line(info,rotate,fb_logo.logo,0,+num_online_cpus());}#elseintfb_prepare_logo(structfb_info*info,introtate){return0;}
--
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
--
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
Let spu_management_ops.enumerate_spus() return the number of found SPEs
and use that information to draw some little helper penguin logos.
Signed-off-by: Geert Uytterhoeven <redacted>
Signed-off-by: Geoff Levand <redacted>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-By: James Simmons <redacted>
---
arch/powerpc/platforms/cell/spu_base.c | 15 ++++++++++++++-
arch/powerpc/platforms/cell/spu_manage.c | 4 +++-
arch/powerpc/platforms/ps3/spu.c | 6 ++++--
3 files changed, 21 insertions(+), 4 deletions(-)
--
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
@@ -14,6 +14,8 @@ obj-$(CONFIG_LOGO_SUPERH_VGA16) += logoobj-$(CONFIG_LOGO_SUPERH_CLUT224)+=logo_superh_clut224.oobj-$(CONFIG_LOGO_M32R_CLUT224)+=logo_m32r_clut224.o+obj-$(CONFIG_SPU_BASE)+=logo_spe_clut224.o+# How to generate logo's# Use logo-cfiles to retrieve list of .c files to be built---/dev/null+++b/drivers/video/logo/logo_spe_clut224.ppm
--
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
On Tuesday 10 July 2007, Geert Uytterhoeven wrote:
Let spu_management_ops.enumerate_spus() return the number of found SPEs
and use that information to draw some little helper penguin logos.
Signed-off-by: Geert Uytterhoeven <redacted>
Signed-off-by: Geoff Levand <redacted>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-By: James Simmons <redacted>
Acked-by: Arnd Bergmann <arnd@arndb.de>
-------------------------------------------------------------------------
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/
The Cell Broadband Engine contains a 64-bit PowerPC core with 2 hardware
threads (called PPEs) and 8 Synergistic Processing Engines (called SPEs).
When booting Linux, 2 penguins logos are shown on the graphical console by
the standard frame buffer console logo code.
To emphasize the existence of the SPEs (which can be used under Linux), we
added a second row of (smaller) helper penguin logos, one for each SPE.
A sample screenshot can be found at
http://www.kernel.org/pub/linux/kernel/people/geoff/cell/debian-penguin-shot.png
(or on the ps3linux T-shirts we wore at OLS :-)
+void fb_append_extra_logo(const struct linux_logo *logo, unsigned int n)
+{
+ if (!n || fb_logo_ex_num == FB_LOGO_EX_NUM_MAX)
+ return;
+
+ fb_logo_ex[fb_logo_ex_num].logo = logo;
+ fb_logo_ex[fb_logo_ex_num].n = n;
+ fb_logo_ex_num++;
+}
+#endif
+
int fb_prepare_logo(struct fb_info *info, int rotate)
{
int depth = fb_get_color_depth(&info->var, &info->fix);
- int yres;
+ unsigned int yres, height, i;
memset(&fb_logo, 0, sizeof(struct logo_data));
@@ -474,7 +493,21 @@ int fb_prepare_logo(struct fb_info *info fb_logo.depth = 4; else fb_logo.depth = 1; - return fb_logo.logo->height;++ /* FIXME: logo_ex supports only truecolor fb. */+ if (info->fix.visual != FB_VISUAL_TRUECOLOR)+ fb_logo_ex_num = 0;++ height = fb_logo.logo->height;+ for (i = 0; i < fb_logo_ex_num; i++) {+ height += fb_logo_ex[i].logo->height;+ if (height > yres) {+ height -= fb_logo_ex[i].logo->height;+ fb_logo_ex_num = i;+ break;+ }+ }+ return height; } static int fb_show_logo_line(struct fb_info *info, int rotate,
@@ -547,8 +580,17 @@ static int fb_show_logo_line(struct fb_i int fb_show_logo(struct fb_info *info, int rotate) {- return fb_show_logo_line(info, rotate, fb_logo.logo, 0,- num_online_cpus());+ int y, i;++ y = fb_show_logo_line(info, rotate, fb_logo.logo, 0,+ num_online_cpus());++ for (i = 0; i < fb_logo_ex_num; i++) {+ y += fb_show_logo_line(info, rotate,+ fb_logo_ex[i].logo, y, fb_logo_ex[i].n);+ }++ return y; } #else int fb_prepare_logo(struct fb_info *info, int rotate) { return 0; }--- a/include/linux/linux_logo.h+++ b/include/linux/linux_logo.h
The CONFIG_LOGO is also probably redundant, but that's arguable.
Tony
-------------------------------------------------------------------------
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/
IIRC, it's needed for the CONFIG_FB=m case.
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
The CONFIG_LOGO is also probably redundant, but that's arguable.
You can have CONFIG_LOGO without CONFIG_FB (depends on FB ||
SGI_NEWPORT_CONSOLE).
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
The Cell Broadband Engine contains a 64-bit PowerPC core with 2 hardware
threads (called PPEs) and 8 Synergistic Processing Engines (called SPEs).
When booting Linux, 2 penguins logos are shown on the graphical console by
the standard frame buffer console logo code.
To emphasize the existence of the SPEs (which can be used under Linux), we
added a second row of (smaller) helper penguin logos, one for each SPE.
A sample screenshot can be found at
http://www.kernel.org/pub/linux/kernel/people/geoff/cell/debian-penguin-shot.png
(or on the ps3linux T-shirts we wore at OLS :-)
I queued #4 up along with the fbdev patches, even though it isn't really an
fbdev patch.
OK, thanks!
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
This one does give additional code and data to all fbdev users while only
being useful to cell machines. Should we fix that?
I can protect it by #ifdef CONFIG_PPC_CELL (as long as there are no other
users). Would that be OK?
umm, your call. If that makes sense, sure.
I just don't like putting platform-specific checks in common code.
Perhaps I better add CONFIG_FB_LOGO_EXTRA and make it depend on
CONFIG_PPC_CELL?
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
This one does give additional code and data to all fbdev users while only
being useful to cell machines. Should we fix that?
I can protect it by #ifdef CONFIG_PPC_CELL (as long as there are no other
users). Would that be OK?
If you want to have an #ifdef in there, it should probably be
CONFIG_FB_EXTRA_LOGO and have that autoselected by CONFIG_SPU_BASE.
A nicer alternative to the #ifdef might be to mark it __init, so
that it will just go away after boot. Not sure if that's safe
though.
Arnd <><
-------------------------------------------------------------------------
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/
What would happen if CONFIG_FB=m? (We already have a patch that prevents
logo drawing if the driver or fbcon is modular)
Tony
-------------------------------------------------------------------------
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/
The CONFIG_LOGO is also probably redundant, but that's arguable.
You can have CONFIG_LOGO without CONFIG_FB (depends on FB ||
SGI_NEWPORT_CONSOLE).
Okay.
Tony
-------------------------------------------------------------------------
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/
What would happen if CONFIG_FB=m? (We already have a patch that prevents
logo drawing if the driver or fbcon is modular)
Then we use the dummy fb_append_extra_logo() in <linux/linux_logo.h>.
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
This one does give additional code and data to all fbdev users while only
being useful to cell machines. Should we fix that?
I can protect it by #ifdef CONFIG_PPC_CELL (as long as there are no other
users). Would that be OK?
umm, your call. If that makes sense, sure.
I just don't like putting platform-specific checks in common code.
Perhaps I better add CONFIG_FB_LOGO_EXTRA and make it depend on
CONFIG_PPC_CELL?
I hate depends when it's not a dependency... the logo extra code doesn't
-depend- technically on cell (it doesn't call cell only stuff). However,
cell wants it enabled, thus I'd rather use either the "default y if
PP_CELL" construct or select it from the cell option.
Ben.
-------------------------------------------------------------------------
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/