Skip to content

Commit ac6d088

Browse files
vincent-mailholhdeller
authored andcommitted
video/logo: move logo selection logic to Kconfig
Now that the path to the logo file can be directly entered in Kbuild, there is no more need to handle all the logo file selection in the Makefile and the C files. The only exception is the logo_spe_clut224 which is only used by the Cell processor (found for example in the Playstation 3) [1]. This extra logo uses its own different image which shows up on a separate line just below the normal logo. Because the extra logo uses a different image, it can not be factorized under the custom logo logic. Move all the logo file selection logic to Kbuild (except from the logo_spe_clut224.ppm), this done, clean-up the C code to only leave one entry for each logo type (monochrome, 16-colors and 224-colors). [1] Cell SPE logos Link: https://lore.kernel.org/all/20070710122702.765654000@pademelon.sonytel.be/ Signed-off-by: Vincent Mailhol <mailhol@kernel.org> Signed-off-by: Helge Deller <deller@gmx.de>
1 parent 3092718 commit ac6d088

4 files changed

Lines changed: 11 additions & 93 deletions

File tree

drivers/video/logo/Kconfig

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ config LOGO_LINUX_MONO
2525
config LOGO_LINUX_MONO_FILE
2626
string "Monochrome logo .pbm file"
2727
depends on LOGO_LINUX_MONO
28+
default "drivers/video/logo/logo_superh_mono.pbm" if SUPERH
2829
default "drivers/video/logo/logo_linux_mono.pbm"
2930
help
3031
Takes a path to a monochromatic logo in the portable pixmap file
@@ -42,6 +43,7 @@ config LOGO_LINUX_VGA16
4243
config LOGO_LINUX_VGA16_FILE
4344
string "16-color logo .ppm file"
4445
depends on LOGO_LINUX_VGA16
46+
default "drivers/video/logo/logo_superh_vga16.ppm" if SUPERH
4547
default "drivers/video/logo/logo_linux_vga16.ppm"
4648
help
4749
Takes a path to a logo in the portable pixmap file format (.ppm),
@@ -61,6 +63,11 @@ config LOGO_LINUX_CLUT224
6163
config LOGO_LINUX_CLUT224_FILE
6264
string "224-color logo .ppm file"
6365
depends on LOGO_LINUX_CLUT224
66+
default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
67+
default "drivers/video/logo/logo_parisc_clut224.ppm" if PARISC
68+
default "drivers/video/logo/logo_sgi_clut224.ppm" if SGI_IP22 || SGI_IP27 || SGI_IP32
69+
default "drivers/video/logo/logo_sun_clut224.ppm" if SPARC
70+
default "drivers/video/logo/logo_superh_clut224.ppm" if SUPERH
6471
default "drivers/video/logo/logo_linux_clut224.ppm"
6572
help
6673
Takes a path to a 224-color logo in the portable pixmap file
@@ -71,40 +78,4 @@ config LOGO_LINUX_CLUT224_FILE
7178

7279
magick source_image -compress none -colors 224 destination.ppm
7380

74-
config LOGO_DEC_CLUT224
75-
bool "224-color Digital Equipment Corporation Linux logo"
76-
depends on MACH_DECSTATION || ALPHA
77-
default y
78-
79-
80-
config LOGO_PARISC_CLUT224
81-
bool "224-color PA-RISC Linux logo"
82-
depends on PARISC
83-
default y
84-
85-
config LOGO_SGI_CLUT224
86-
bool "224-color SGI Linux logo"
87-
depends on SGI_IP22 || SGI_IP27 || SGI_IP32
88-
default y
89-
90-
config LOGO_SUN_CLUT224
91-
bool "224-color Sun Linux logo"
92-
depends on SPARC
93-
default y
94-
95-
config LOGO_SUPERH_MONO
96-
bool "Black and white SuperH Linux logo"
97-
depends on SUPERH
98-
default y
99-
100-
config LOGO_SUPERH_VGA16
101-
bool "16-color SuperH Linux logo"
102-
depends on SUPERH
103-
default y
104-
105-
config LOGO_SUPERH_CLUT224
106-
bool "224-color SuperH Linux logo"
107-
depends on SUPERH
108-
default y
109-
11081
endif # LOGO

drivers/video/logo/Makefile

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ obj-$(CONFIG_LOGO) += logo.o
55
obj-$(CONFIG_LOGO_LINUX_MONO) += logo_linux_mono.o
66
obj-$(CONFIG_LOGO_LINUX_VGA16) += logo_linux_vga16.o
77
obj-$(CONFIG_LOGO_LINUX_CLUT224) += logo_linux_clut224.o
8-
obj-$(CONFIG_LOGO_DEC_CLUT224) += logo_dec_clut224.o
9-
obj-$(CONFIG_LOGO_PARISC_CLUT224) += logo_parisc_clut224.o
10-
obj-$(CONFIG_LOGO_SGI_CLUT224) += logo_sgi_clut224.o
11-
obj-$(CONFIG_LOGO_SUN_CLUT224) += logo_sun_clut224.o
12-
obj-$(CONFIG_LOGO_SUPERH_MONO) += logo_superh_mono.o
13-
obj-$(CONFIG_LOGO_SUPERH_VGA16) += logo_superh_vga16.o
14-
obj-$(CONFIG_LOGO_SUPERH_CLUT224) += logo_superh_clut224.o
158

169
obj-$(CONFIG_SPU_BASE) += logo_spe_clut224.o
1710

@@ -32,12 +25,6 @@ $(obj)/logo_linux_vga16.c: $(CONFIG_LOGO_LINUX_VGA16_FILE) $(obj)/pnmtologo FORC
3225
$(obj)/logo_linux_clut224.c: $(CONFIG_LOGO_LINUX_CLUT224_FILE) $(obj)/pnmtologo FORCE
3326
$(call if_changed,logo,clut224)
3427

35-
$(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
36-
$(call if_changed,logo,mono)
37-
38-
$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(obj)/pnmtologo FORCE
39-
$(call if_changed,logo,vga16)
40-
4128
$(obj)/%_clut224.c: $(src)/%_clut224.ppm $(obj)/pnmtologo FORCE
4229
$(call if_changed,logo,clut224)
4330

drivers/video/logo/logo.c

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -48,54 +48,21 @@ const struct linux_logo * __ref fb_find_logo(int depth)
4848
if (nologo || logos_freed)
4949
return NULL;
5050

51-
if (depth >= 1) {
5251
#ifdef CONFIG_LOGO_LINUX_MONO
53-
/* Generic Linux logo */
52+
if (depth >= 1)
5453
logo = &logo_linux_mono;
5554
#endif
56-
#ifdef CONFIG_LOGO_SUPERH_MONO
57-
/* SuperH Linux logo */
58-
logo = &logo_superh_mono;
59-
#endif
60-
}
6155

62-
if (depth >= 4) {
6356
#ifdef CONFIG_LOGO_LINUX_VGA16
64-
/* Generic Linux logo */
57+
if (depth >= 4)
6558
logo = &logo_linux_vga16;
6659
#endif
67-
#ifdef CONFIG_LOGO_SUPERH_VGA16
68-
/* SuperH Linux logo */
69-
logo = &logo_superh_vga16;
70-
#endif
71-
}
7260

73-
if (depth >= 8) {
7461
#ifdef CONFIG_LOGO_LINUX_CLUT224
75-
/* Generic Linux logo */
62+
if (depth >= 8)
7663
logo = &logo_linux_clut224;
7764
#endif
78-
#ifdef CONFIG_LOGO_DEC_CLUT224
79-
/* DEC Linux logo on MIPS/MIPS64 or ALPHA */
80-
logo = &logo_dec_clut224;
81-
#endif
82-
#ifdef CONFIG_LOGO_PARISC_CLUT224
83-
/* PA-RISC Linux logo */
84-
logo = &logo_parisc_clut224;
85-
#endif
86-
#ifdef CONFIG_LOGO_SGI_CLUT224
87-
/* SGI Linux logo on MIPS/MIPS64 */
88-
logo = &logo_sgi_clut224;
89-
#endif
90-
#ifdef CONFIG_LOGO_SUN_CLUT224
91-
/* Sun Linux logo */
92-
logo = &logo_sun_clut224;
93-
#endif
94-
#ifdef CONFIG_LOGO_SUPERH_CLUT224
95-
/* SuperH Linux logo */
96-
logo = &logo_superh_clut224;
97-
#endif
98-
}
65+
9966
return logo;
10067
}
10168
EXPORT_SYMBOL_GPL(fb_find_logo);

include/linux/linux_logo.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ struct linux_logo {
3333
extern const struct linux_logo logo_linux_mono;
3434
extern const struct linux_logo logo_linux_vga16;
3535
extern const struct linux_logo logo_linux_clut224;
36-
extern const struct linux_logo logo_dec_clut224;
37-
extern const struct linux_logo logo_parisc_clut224;
38-
extern const struct linux_logo logo_sgi_clut224;
39-
extern const struct linux_logo logo_sun_clut224;
40-
extern const struct linux_logo logo_superh_mono;
41-
extern const struct linux_logo logo_superh_vga16;
42-
extern const struct linux_logo logo_superh_clut224;
4336
extern const struct linux_logo logo_spe_clut224;
4437

4538
extern const struct linux_logo *fb_find_logo(int depth);

0 commit comments

Comments
 (0)