Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Vincent Mailhol and committed by
Helge Deller
ac6d088b 3092718e

+11 -93
+7 -36
drivers/video/logo/Kconfig
··· 25 25 config LOGO_LINUX_MONO_FILE 26 26 string "Monochrome logo .pbm file" 27 27 depends on LOGO_LINUX_MONO 28 + default "drivers/video/logo/logo_superh_mono.pbm" if SUPERH 28 29 default "drivers/video/logo/logo_linux_mono.pbm" 29 30 help 30 31 Takes a path to a monochromatic logo in the portable pixmap file ··· 43 42 config LOGO_LINUX_VGA16_FILE 44 43 string "16-color logo .ppm file" 45 44 depends on LOGO_LINUX_VGA16 45 + default "drivers/video/logo/logo_superh_vga16.ppm" if SUPERH 46 46 default "drivers/video/logo/logo_linux_vga16.ppm" 47 47 help 48 48 Takes a path to a logo in the portable pixmap file format (.ppm), ··· 63 61 config LOGO_LINUX_CLUT224_FILE 64 62 string "224-color logo .ppm file" 65 63 depends on LOGO_LINUX_CLUT224 64 + default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA 65 + default "drivers/video/logo/logo_parisc_clut224.ppm" if PARISC 66 + default "drivers/video/logo/logo_sgi_clut224.ppm" if SGI_IP22 || SGI_IP27 || SGI_IP32 67 + default "drivers/video/logo/logo_sun_clut224.ppm" if SPARC 68 + default "drivers/video/logo/logo_superh_clut224.ppm" if SUPERH 66 69 default "drivers/video/logo/logo_linux_clut224.ppm" 67 70 help 68 71 Takes a path to a 224-color logo in the portable pixmap file ··· 77 70 an image palette to 224 colors and convert it into a ppm file: 78 71 79 72 magick source_image -compress none -colors 224 destination.ppm 80 - 81 - config LOGO_DEC_CLUT224 82 - bool "224-color Digital Equipment Corporation Linux logo" 83 - depends on MACH_DECSTATION || ALPHA 84 - default y 85 - 86 - 87 - config LOGO_PARISC_CLUT224 88 - bool "224-color PA-RISC Linux logo" 89 - depends on PARISC 90 - default y 91 - 92 - config LOGO_SGI_CLUT224 93 - bool "224-color SGI Linux logo" 94 - depends on SGI_IP22 || SGI_IP27 || SGI_IP32 95 - default y 96 - 97 - config LOGO_SUN_CLUT224 98 - bool "224-color Sun Linux logo" 99 - depends on SPARC 100 - default y 101 - 102 - config LOGO_SUPERH_MONO 103 - bool "Black and white SuperH Linux logo" 104 - depends on SUPERH 105 - default y 106 - 107 - config LOGO_SUPERH_VGA16 108 - bool "16-color SuperH Linux logo" 109 - depends on SUPERH 110 - default y 111 - 112 - config LOGO_SUPERH_CLUT224 113 - bool "224-color SuperH Linux logo" 114 - depends on SUPERH 115 - default y 116 73 117 74 endif # LOGO
-13
drivers/video/logo/Makefile
··· 5 5 obj-$(CONFIG_LOGO_LINUX_MONO) += logo_linux_mono.o 6 6 obj-$(CONFIG_LOGO_LINUX_VGA16) += logo_linux_vga16.o 7 7 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 15 8 16 9 obj-$(CONFIG_SPU_BASE) += logo_spe_clut224.o 17 10 ··· 24 31 25 32 $(obj)/logo_linux_clut224.c: $(CONFIG_LOGO_LINUX_CLUT224_FILE) $(obj)/pnmtologo FORCE 26 33 $(call if_changed,logo,clut224) 27 - 28 - $(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE 29 - $(call if_changed,logo,mono) 30 - 31 - $(obj)/%_vga16.c: $(src)/%_vga16.ppm $(obj)/pnmtologo FORCE 32 - $(call if_changed,logo,vga16) 33 34 34 35 $(obj)/%_clut224.c: $(src)/%_clut224.ppm $(obj)/pnmtologo FORCE 35 36 $(call if_changed,logo,clut224)
+4 -37
drivers/video/logo/logo.c
··· 48 48 if (nologo || logos_freed) 49 49 return NULL; 50 50 51 - if (depth >= 1) { 52 51 #ifdef CONFIG_LOGO_LINUX_MONO 53 - /* Generic Linux logo */ 52 + if (depth >= 1) 54 53 logo = &logo_linux_mono; 55 54 #endif 56 - #ifdef CONFIG_LOGO_SUPERH_MONO 57 - /* SuperH Linux logo */ 58 - logo = &logo_superh_mono; 59 - #endif 60 - } 61 55 62 - if (depth >= 4) { 63 56 #ifdef CONFIG_LOGO_LINUX_VGA16 64 - /* Generic Linux logo */ 57 + if (depth >= 4) 65 58 logo = &logo_linux_vga16; 66 59 #endif 67 - #ifdef CONFIG_LOGO_SUPERH_VGA16 68 - /* SuperH Linux logo */ 69 - logo = &logo_superh_vga16; 70 - #endif 71 - } 72 60 73 - if (depth >= 8) { 74 61 #ifdef CONFIG_LOGO_LINUX_CLUT224 75 - /* Generic Linux logo */ 62 + if (depth >= 8) 76 63 logo = &logo_linux_clut224; 77 64 #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 + 99 66 return logo; 100 67 } 101 68 EXPORT_SYMBOL_GPL(fb_find_logo);
-7
include/linux/linux_logo.h
··· 33 33 extern const struct linux_logo logo_linux_mono; 34 34 extern const struct linux_logo logo_linux_vga16; 35 35 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; 43 36 extern const struct linux_logo logo_spe_clut224; 44 37 45 38 extern const struct linux_logo *fb_find_logo(int depth);