Skip to contentSkip to conversation

Cell SPE logos

PATCH In review Geert Uytterhoeven 5 participants 18 messages Jul 10, 2007 – Jul 13, 2007

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover Cell SPE logos

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:   [email protected]	
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

#1 lore raw

PATCH 1/4 fbdev: extract fb_show_logo_line()

Extract the code to draw one line of logos into fb_show_logo_line()

---
 drivers/video/fbmem.c |   39 +++++++++++++++++++++++----------------
 1 files changed, 23 insertions(+), 16 deletions(-)
drivers/video/fbmem.c +23 -16
@@ -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; }
Signature · 18 lines
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:   [email protected]	
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
#2 lore raw

PATCH 2/4 fbdev: Add fb_append_extra_logo()

In reply to Geert Uytterhoeven

Add fb_append_extra_logo(), to append extra lines of logos below the standard Linux logo.

---
 drivers/video/fbmem.c      |   50 +++++++++++++++++++++++++++++++++++++++++----
 include/linux/linux_logo.h |    8 +++++++
 2 files changed, 54 insertions(+), 4 deletions(-)
drivers/video/fbmem.c +46 -4
@@ -318,6 +318,13 @@ static struct logo_data {
 	const struct linux_logo *logo;
 } fb_logo __read_mostly;
 
+#define FB_LOGO_EX_NUM_MAX 10
+static struct logo_data_extra {
+	const struct linux_logo *logo;
+	unsigned int n;
+} fb_logo_ex[FB_LOGO_EX_NUM_MAX];
+static unsigned int fb_logo_ex_num;
+
 static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height)
 {
 	u32 size = width * height, i;
@@ -411,10 +418,22 @@ static void fb_do_show_logo(struct fb_in
 	}
 }
 
+#ifdef CONFIG_FB
+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; }
include/linux/linux_logo.h +8 -0
@@ -33,5 +33,13 @@ struct linux_logo {
 };
 
 extern const struct linux_logo *fb_find_logo(int depth);
+#if defined(CONFIG_LOGO) && defined(CONFIG_FB)
+extern void fb_append_extra_logo(const struct linux_logo *logo,
+				 unsigned int n);
+#else
+static inline void fb_append_extra_logo(const struct linux_logo *logo,
+					unsigned int n)
+{}
+#endif
 
 #endif /* _LINUX_LINUX_LOGO_H */
Signature · 18 lines
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:   [email protected]	
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 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/

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

#3 lore raw

Re: [patch 2/4] fbdev: Add fb_append_extra_logo()

Quoted 29 lines · Geert Uytterhoeven

plain text document attachment (spe-logo)
Add fb_append_extra_logo(), to append extra lines of logos below the standard Linux logo.

---
 drivers/video/fbmem.c      |   50 +++++++++++++++++++++++++++++++++++++++++----
 include/linux/linux_logo.h |    8 +++++++
 2 files changed, 54 insertions(+), 4 deletions(-)
drivers/video/fbmem.c +7 -0
@@ -318,6 +318,13 @@ static struct logo_data {
 	const struct linux_logo *logo;
 } fb_logo __read_mostly;
 
+#define FB_LOGO_EX_NUM_MAX 10
+static struct logo_data_extra {
+	const struct linux_logo *logo;
+	unsigned int n;
+} fb_logo_ex[FB_LOGO_EX_NUM_MAX];
+static unsigned int fb_logo_ex_num;
+
 static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height)
 {
 	u32 size = width * height, i;

drivers/video/fbmem.c static void fb_do_show_logo(struct fb_in · line 421

Quoted 4 lines
drivers/video/fbmem.c +1 -0
@@ -411,10 +418,22 @@ static void fb_do_show_logo(struct fb_in
 	}
 }
 
+#ifdef CONFIG_FB

The #ifdef is redundant.

Quoted 65 lines
drivers/video/fbmem.c +38 -4
+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; }

include/linux/linux_logo.h struct linux_logo { · line 36

Quoted 4 lines
include/linux/linux_logo.h +1 -0
@@ -33,5 +33,13 @@ struct linux_logo {
 };
 
 extern const struct linux_logo *fb_find_logo(int depth);
+#if defined(CONFIG_LOGO) && defined(CONFIG_FB)

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/

#4 lore raw

Re: [patch 2/4] fbdev: Add fb_append_extra_logo()

Quoted 21 lines · Antonino A. Daplas
Quoted 20 lines · Geert Uytterhoeven
drivers/video/fbmem.c +7 -0
@@ -318,6 +318,13 @@ static struct logo_data {
 	const struct linux_logo *logo;
 } fb_logo __read_mostly;
 
+#define FB_LOGO_EX_NUM_MAX 10
+static struct logo_data_extra {
+	const struct linux_logo *logo;
+	unsigned int n;
+} fb_logo_ex[FB_LOGO_EX_NUM_MAX];
+static unsigned int fb_logo_ex_num;
+
 static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height)
 {
 	u32 size = width * height, i;
@@ -411,10 +418,22 @@ static void fb_do_show_logo(struct fb_in
 	}
 }
 
Quoted 3 lines

drivers/video/fbmem.c static void fb_do_show_logo(struct fb_in · line 421

Quoted 1 line
drivers/video/fbmem.c +1 -0
+#ifdef CONFIG_FB

The #ifdef is redundant.

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:   [email protected]	
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 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/

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

#5 lore raw

Re: [patch 2/4] fbdev: Add fb_append_extra_logo()

Quoted 22 lines · Geert Uytterhoeven
Quoted 21 lines · Antonino A. Daplas
Quoted 20 lines · Geert Uytterhoeven
drivers/video/fbmem.c +7 -0
@@ -318,6 +318,13 @@ static struct logo_data {
 	const struct linux_logo *logo;
 } fb_logo __read_mostly;
 
+#define FB_LOGO_EX_NUM_MAX 10
+static struct logo_data_extra {
+	const struct linux_logo *logo;
+	unsigned int n;
+} fb_logo_ex[FB_LOGO_EX_NUM_MAX];
+static unsigned int fb_logo_ex_num;
+
 static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height)
 {
 	u32 size = width * height, i;
@@ -411,10 +418,22 @@ static void fb_do_show_logo(struct fb_in
 	}
 }
 
Quoted 5 lines
Quoted 3 lines

drivers/video/fbmem.c static void fb_do_show_logo(struct fb_in · line 421

Quoted 1 line
drivers/video/fbmem.c +1 -0
+#ifdef CONFIG_FB

The #ifdef is redundant.

IIRC, it's needed for the CONFIG_FB=m case.

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/

#6 lore raw

Re: [patch 2/4] fbdev: Add fb_append_extra_logo()

Quoted 23 lines · Antonino A. Daplas
Quoted 22 lines · Geert Uytterhoeven
Quoted 21 lines · Antonino A. Daplas
Quoted 20 lines · Geert Uytterhoeven
drivers/video/fbmem.c +7 -0
@@ -318,6 +318,13 @@ static struct logo_data {
 	const struct linux_logo *logo;
 } fb_logo __read_mostly;
 
+#define FB_LOGO_EX_NUM_MAX 10
+static struct logo_data_extra {
+	const struct linux_logo *logo;
+	unsigned int n;
+} fb_logo_ex[FB_LOGO_EX_NUM_MAX];
+static unsigned int fb_logo_ex_num;
+
 static void fb_rotate_logo_ud(const u8 *in, u8 *out, u32 width, u32 height)
 {
 	u32 size = width * height, i;
@@ -411,10 +418,22 @@ static void fb_do_show_logo(struct fb_in
 	}
 }
 
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

drivers/video/fbmem.c static void fb_do_show_logo(struct fb_in · line 421

Quoted 1 line
drivers/video/fbmem.c +1 -0
+#ifdef CONFIG_FB

The #ifdef is redundant.

IIRC, it's needed for the CONFIG_FB=m case.

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:   [email protected]	
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 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/

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

#7 lore raw

Re: [patch 2/4] fbdev: Add fb_append_extra_logo()

In reply to Antonino A. Daplas
Quoted 10 lines · Antonino A. Daplas

include/linux/linux_logo.h struct linux_logo { · line 36

Quoted 7 lines · Geert Uytterhoeven
include/linux/linux_logo.h +1 -0
@@ -33,5 +33,13 @@ struct linux_logo {
 };
 
 extern const struct linux_logo *fb_find_logo(int depth);
+#if defined(CONFIG_LOGO) && defined(CONFIG_FB)

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:   [email protected]	
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

#8 lore raw

Re: [patch 2/4] fbdev: Add fb_append_extra_logo()

Quoted 7 lines · Geert Uytterhoeven
Quoted 6 lines · Antonino A. Daplas
Quoted 5 lines · Geert Uytterhoeven
include/linux/linux_logo.h +0 -0
@@ -33,5 +33,13 @@ struct linux_logo {
 };
 
Quoted 8 lines
Quoted 4 lines

include/linux/linux_logo.h struct linux_logo { · line 36

Quoted 2 lines
include/linux/linux_logo.h +1 -0
 extern const struct linux_logo *fb_find_logo(int depth);
+#if defined(CONFIG_LOGO) && defined(CONFIG_FB)

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/

#9 lore raw

PATCH 3/4 fbdev: SPE helper penguin logo

In reply to Geert Uytterhoeven

Add the SPE helper penguin logo

---
 drivers/video/logo/Makefile             |    2 
 drivers/video/logo/logo_spe_clut224.ppm |  283 ++++++++++++++++++++++++++++++++
 2 files changed, 285 insertions(+)
drivers/video/logo/Makefile +2 -0
@@ -14,6 +14,8 @@ obj-$(CONFIG_LOGO_SUPERH_VGA16)		+= logo
 obj-$(CONFIG_LOGO_SUPERH_CLUT224)	+= logo_superh_clut224.o
 obj-$(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
drivers/video/logo/logo_spe_clut224.ppm new file +283 -0

283 lines not on this page · raw message

Signature · 18 lines
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:   [email protected]	
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 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/

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

#10 lore raw

PATCH 4/4 Cell: Draw SPE helper penguin logos

In reply to Geert Uytterhoeven

Let spu_management_ops.enumerate_spus() return the number of found SPEs and use that information to draw some little helper penguin logos.

---
 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(-)
arch/powerpc/platforms/cell/spu_base.c +14 -1
@@ -31,6 +31,7 @@
 #include <linux/mm.h>
 #include <linux/io.h>
 #include <linux/mutex.h>
+#include <linux/linux_logo.h>
 #include <asm/spu.h>
 #include <asm/spu_priv1.h>
 #include <asm/xmon.h>
@@ -603,12 +604,24 @@ static int __init init_spu_base(void)
 
 	ret = spu_enumerate_spus(create_spu);
 
-	if (ret) {
+	if (ret < 0) {
 		printk(KERN_WARNING "%s: Error initializing spus\n",
 			__FUNCTION__);
 		goto out_unregister_sysdev_class;
 	}
 
+	if (ret > 0) {
+		/*
+		 * We cannot put the forward declaration in
+		 * <linux/linux_logo.h> because of conflicting session type
+		 * conflicts for const and __initdata with different compiler
+		 * versions
+		 */
+		extern const struct linux_logo logo_spe_clut224;
+
+		fb_append_extra_logo(&logo_spe_clut224, ret);
+	}
+
 	xmon_register_spus(&spu_full_list);
 
 	return 0;
arch/powerpc/platforms/cell/spu_manage.c +3 -1
@@ -279,6 +279,7 @@ static int __init of_enumerate_spus(int 
 {
 	int ret;
 	struct device_node *node;
+	unsigned int n = 0;
 
 	ret = -ENODEV;
 	for (node = of_find_node_by_type(NULL, "spe");
@@ -289,8 +290,9 @@ static int __init of_enumerate_spus(int 
 				__FUNCTION__, node->name);
 			break;
 		}
+		n++;
 	}
-	return ret;
+	return ret ? ret : n;
 }
 
 static int __init of_create_spu(struct spu *spu, void *data)
arch/powerpc/platforms/ps3/spu.c +4 -2
@@ -400,11 +400,13 @@ static int __init ps3_enumerate_spus(int
 		}
 	}
 
-	if (result)
+	if (result) {
 		printk(KERN_WARNING "%s:%d: Error initializing spus\n",
 			__func__, __LINE__);
+		return result;
+	}
 
-	return result;
+	return num_resource_id;
 }
 
 const struct spu_management_ops spu_management_ps3_ops = {
Signature · 18 lines
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:   [email protected]	
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 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/

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

Acked-by on v1 4/4
#11 lore raw

Re: [Cbe-oss-dev] [patch 4/4] Cell: Draw SPE helper penguin logos

Quoted 7 lines · Geert Uytterhoeven

Let spu_management_ops.enumerate_spus() return the number of found SPEs and use that information to draw some little helper penguin logos.

-------------------------------------------------------------------------
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/

#12 lore raw
In reply to Geert Uytterhoeven
Quoted 11 lines · On Tue, 10 Jul 2007 14:27:02 +0200 Geert Uytterhoeven…

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 :-)

Does this mean I'll get penguins on my PS3 now?

Quoted 3 lines

Summaries:
[1] fbdev: extract fb_show_logo_line()
[2] fbdev: Add fb_append_extra_logo()

This one does give additional code and data to all fbdev users while only being useful to cell machines. Should we fix that?

Quoted 2 lines

[3] fbdev: SPE helper penguin logo
[4] Cell: Draw SPE helper penguin logos

I queued #4 up along with the fbdev patches, even though it isn't really an fbdev patch.

#13 lore raw
Quoted 8 lines · Andrew Morton
Quoted 5 lines · On Tue, 10 Jul 2007 14:27:02 +0200 Geert Uytterhoeven…

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.

Quoted 8 lines
Quoted 6 lines

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 :-)

Does this mean I'll get penguins on my PS3 now?

Sure!

Quoted 6 lines
Quoted 3 lines

Summaries:
[1] fbdev: extract fb_show_logo_line()
[2] fbdev: Add fb_append_extra_logo()

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?

Quoted 5 lines
Quoted 2 lines

[3] fbdev: SPE helper penguin logo
[4] Cell: Draw SPE helper penguin logos

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:   [email protected]	
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 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/

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

#14 lore raw
Quoted 9 lines · On Fri, 13 Jul 2007 10:52:10 +0200 (CEST) Geert Uytterhoeven…
Quoted 6 lines
Quoted 3 lines

Summaries:
[1] fbdev: extract fb_show_logo_line()
[2] fbdev: Add fb_append_extra_logo()

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.

#15 lore raw
Quoted 6 lines · Andrew Morton
Quoted 4 lines · On Fri, 13 Jul 2007 10:52:10 +0200 (CEST) Geert Uytterhoeven…
Quoted 4 lines
Quoted 3 lines

Summaries:
[1] fbdev: extract fb_show_logo_line()
[2] fbdev: Add fb_append_extra_logo()

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

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:   [email protected]	
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 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/

_______________________________________________
Linux-fbdev-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel

#16 lore raw
Quoted 13 lines · Geert Uytterhoeven
Quoted 12 lines · Andrew Morton
Quoted 9 lines · On Fri, 13 Jul 2007 10:52:10 +0200 (CEST) Geert Uytterhoeven…
Quoted 6 lines
Quoted 3 lines

Summaries:
[1] fbdev: extract fb_show_logo_line()
[2] fbdev: Add fb_append_extra_logo()

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?

Quoted 6 lines
Quoted 1 line

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/

#17 lore raw
In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven
Quoted 6 lines
Quoted 3 lines

Summaries:
  [1] fbdev: extract fb_show_logo_line()
  [2] fbdev: Add fb_append_extra_logo()

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/