[PATCH v2 6/6] video/logo: move logo selection logic to Kconfig

Vincent Mailhol posted 6 patches 1 month, 1 week ago
There is a newer version of this series
[PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Vincent Mailhol 1 month, 1 week ago
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>
---
**Changelog**

v1 -> v2:

  - By removing the logo_spe_clut224.o target from the Makefile, v1
    also removed the logo_spe_clut224 object which is still being
    referenced in

      arch/powerpc/platforms/cell/spu_base.c

    Restore the logo_spe_clut224.o target.

Link: https://lore.kernel.org/all/20251230-custom-logo-v1-6-4736374569ee@kernel.org/
---
 drivers/video/logo/Kconfig  | 48 ++++++++-------------------------------------
 drivers/video/logo/Makefile | 14 -------------
 drivers/video/logo/logo.c   | 46 ++++---------------------------------------
 include/linux/linux_logo.h  |  8 --------
 4 files changed, 12 insertions(+), 104 deletions(-)

diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig
index 1d1651c067a1..af9301ebc51c 100644
--- a/drivers/video/logo/Kconfig
+++ b/drivers/video/logo/Kconfig
@@ -25,6 +25,7 @@ config LOGO_LINUX_MONO
 config LOGO_LINUX_MONO_FILE
 	string "Monochrome logo .pbm file"
 	depends on LOGO_LINUX_MONO
+	default "drivers/video/logo/logo_superh_mono.pbm" if SUPERH
 	default "drivers/video/logo/logo_linux_mono.pbm"
 	help
 	  Takes a path to a monochromatic logo in the portable pixmap file
@@ -42,6 +43,7 @@ config LOGO_LINUX_VGA16
 config LOGO_LINUX_VGA16_FILE
 	string "16-color logo .ppm file"
 	depends on LOGO_LINUX_VGA16
+	default "drivers/video/logo/logo_superh_vga16.ppm" if SUPERH
 	default "drivers/video/logo/logo_linux_vga16.ppm"
 	help
 	  Takes a path to a logo in the portable pixmap file format (.ppm),
@@ -61,6 +63,12 @@ config LOGO_LINUX_CLUT224
 config LOGO_LINUX_CLUT224_FILE
 	string "224-color logo .ppm file"
 	depends on LOGO_LINUX_CLUT224
+	default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
+	default "drivers/video/logo/logo_mac_clut224.ppm" if MAC
+	default "drivers/video/logo/logo_parisc_clut224.ppm" if PARISC
+	default "drivers/video/logo/logo_sgi_clut224.ppm" if SGI_IP22 || SGI_IP27 || SGI_IP32
+	default "drivers/video/logo/logo_sun_clut224.ppm" if SPARC
+	default "drivers/video/logo/logo_superh_clut224.ppm" if SUPERH
 	default "drivers/video/logo/logo_linux_clut224.ppm"
 	help
 	  Takes a path to a 224-color logo in the portable pixmap file
@@ -71,44 +79,4 @@ config LOGO_LINUX_CLUT224_FILE
 
 	    magick source_image -compress none -colors 224 destination.ppm
 
-config LOGO_DEC_CLUT224
-	bool "224-color Digital Equipment Corporation Linux logo"
-	depends on MACH_DECSTATION || ALPHA
-	default y
-
-config LOGO_MAC_CLUT224
-	bool "224-color Macintosh Linux logo"
-	depends on MAC
-	default y
-
-config LOGO_PARISC_CLUT224
-	bool "224-color PA-RISC Linux logo"
-	depends on PARISC
-	default y
-
-config LOGO_SGI_CLUT224
-	bool "224-color SGI Linux logo"
-	depends on SGI_IP22 || SGI_IP27 || SGI_IP32
-	default y
-
-config LOGO_SUN_CLUT224
-	bool "224-color Sun Linux logo"
-	depends on SPARC
-	default y
-
-config LOGO_SUPERH_MONO
-	bool "Black and white SuperH Linux logo"
-	depends on SUPERH
-	default y
-
-config LOGO_SUPERH_VGA16
-	bool "16-color SuperH Linux logo"
-	depends on SUPERH
-	default y
-
-config LOGO_SUPERH_CLUT224
-	bool "224-color SuperH Linux logo"
-	depends on SUPERH
-	default y
-
 endif # LOGO
diff --git a/drivers/video/logo/Makefile b/drivers/video/logo/Makefile
index ac8e9da3f51a..0eddb6231edb 100644
--- a/drivers/video/logo/Makefile
+++ b/drivers/video/logo/Makefile
@@ -5,14 +5,6 @@ obj-$(CONFIG_LOGO)			+= logo.o
 obj-$(CONFIG_LOGO_LINUX_MONO)		+= logo_linux_mono.o
 obj-$(CONFIG_LOGO_LINUX_VGA16)		+= logo_linux_vga16.o
 obj-$(CONFIG_LOGO_LINUX_CLUT224)	+= logo_linux_clut224.o
-obj-$(CONFIG_LOGO_DEC_CLUT224)		+= logo_dec_clut224.o
-obj-$(CONFIG_LOGO_MAC_CLUT224)		+= logo_mac_clut224.o
-obj-$(CONFIG_LOGO_PARISC_CLUT224)	+= logo_parisc_clut224.o
-obj-$(CONFIG_LOGO_SGI_CLUT224)		+= logo_sgi_clut224.o
-obj-$(CONFIG_LOGO_SUN_CLUT224)		+= logo_sun_clut224.o
-obj-$(CONFIG_LOGO_SUPERH_MONO)		+= logo_superh_mono.o
-obj-$(CONFIG_LOGO_SUPERH_VGA16)		+= logo_superh_vga16.o
-obj-$(CONFIG_LOGO_SUPERH_CLUT224)	+= logo_superh_clut224.o
 
 obj-$(CONFIG_SPU_BASE)			+= logo_spe_clut224.o
 
@@ -33,12 +25,6 @@ $(obj)/logo_linux_vga16.c: $(CONFIG_LOGO_LINUX_VGA16_FILE) $(obj)/pnmtologo FORC
 $(obj)/logo_linux_clut224.c: $(CONFIG_LOGO_LINUX_CLUT224_FILE) $(obj)/pnmtologo FORCE
 	$(call if_changed,logo,clut224)
 
-$(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo,mono)
-
-$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo,vga16)
-
 $(obj)/%_clut224.c: $(src)/%_clut224.ppm $(obj)/pnmtologo FORCE
 	$(call if_changed,logo,clut224)
 
diff --git a/drivers/video/logo/logo.c b/drivers/video/logo/logo.c
index 141f15a9a459..91535f8848da 100644
--- a/drivers/video/logo/logo.c
+++ b/drivers/video/logo/logo.c
@@ -48,59 +48,21 @@ const struct linux_logo * __ref fb_find_logo(int depth)
 	if (nologo || logos_freed)
 		return NULL;
 
-	if (depth >= 1) {
 #ifdef CONFIG_LOGO_LINUX_MONO
-		/* Generic Linux logo */
+	if (depth >= 1)
 		logo = &logo_linux_mono;
 #endif
-#ifdef CONFIG_LOGO_SUPERH_MONO
-		/* SuperH Linux logo */
-		logo = &logo_superh_mono;
-#endif
-	}
 	
-	if (depth >= 4) {
 #ifdef CONFIG_LOGO_LINUX_VGA16
-		/* Generic Linux logo */
+	if (depth >= 4)
 		logo = &logo_linux_vga16;
 #endif
-#ifdef CONFIG_LOGO_SUPERH_VGA16
-		/* SuperH Linux logo */
-		logo = &logo_superh_vga16;
-#endif
-	}
 	
-	if (depth >= 8) {
 #ifdef CONFIG_LOGO_LINUX_CLUT224
-		/* Generic Linux logo */
+	if (depth >= 8)
 		logo = &logo_linux_clut224;
 #endif
-#ifdef CONFIG_LOGO_DEC_CLUT224
-		/* DEC Linux logo on MIPS/MIPS64 or ALPHA */
-		logo = &logo_dec_clut224;
-#endif
-#ifdef CONFIG_LOGO_MAC_CLUT224
-		/* Macintosh Linux logo on m68k */
-		if (MACH_IS_MAC)
-			logo = &logo_mac_clut224;
-#endif
-#ifdef CONFIG_LOGO_PARISC_CLUT224
-		/* PA-RISC Linux logo */
-		logo = &logo_parisc_clut224;
-#endif
-#ifdef CONFIG_LOGO_SGI_CLUT224
-		/* SGI Linux logo on MIPS/MIPS64 */
-		logo = &logo_sgi_clut224;
-#endif
-#ifdef CONFIG_LOGO_SUN_CLUT224
-		/* Sun Linux logo */
-		logo = &logo_sun_clut224;
-#endif
-#ifdef CONFIG_LOGO_SUPERH_CLUT224
-		/* SuperH Linux logo */
-		logo = &logo_superh_clut224;
-#endif
-	}
+
 	return logo;
 }
 EXPORT_SYMBOL_GPL(fb_find_logo);
diff --git a/include/linux/linux_logo.h b/include/linux/linux_logo.h
index e37699b7e839..1e727a2cb4c1 100644
--- a/include/linux/linux_logo.h
+++ b/include/linux/linux_logo.h
@@ -33,14 +33,6 @@ struct linux_logo {
 extern const struct linux_logo logo_linux_mono;
 extern const struct linux_logo logo_linux_vga16;
 extern const struct linux_logo logo_linux_clut224;
-extern const struct linux_logo logo_dec_clut224;
-extern const struct linux_logo logo_mac_clut224;
-extern const struct linux_logo logo_parisc_clut224;
-extern const struct linux_logo logo_sgi_clut224;
-extern const struct linux_logo logo_sun_clut224;
-extern const struct linux_logo logo_superh_mono;
-extern const struct linux_logo logo_superh_vga16;
-extern const struct linux_logo logo_superh_clut224;
 extern const struct linux_logo logo_spe_clut224;
 
 extern const struct linux_logo *fb_find_logo(int depth);

-- 
2.52.0
Re: [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Geert Uytterhoeven 1 month ago
Hi Vincent,

CC linux-m68k

Thanks for your patch, which is now commit bd710b3da7308cb1
("video/logo: move logo selection logic to Kconfig") in fbdev/for-next.

On Thu, 1 Jan 2026 at 16:26, Vincent Mailhol <mailhol@kernel.org> wrote:
> 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.

This may do the wrong thing when booting a multi-platform kernel.

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

> --- a/drivers/video/logo/Kconfig
> +++ b/drivers/video/logo/Kconfig

> @@ -61,6 +63,12 @@ config LOGO_LINUX_CLUT224
>  config LOGO_LINUX_CLUT224_FILE
>         string "224-color logo .ppm file"
>         depends on LOGO_LINUX_CLUT224
> +       default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
> +       default "drivers/video/logo/logo_mac_clut224.ppm" if MAC

E.g. an m68k multi-platform kernel including Mac support will scare
non-Mac users into thinking their machine was assimilated by the
Apple Empire...

> +       default "drivers/video/logo/logo_parisc_clut224.ppm" if PARISC
> +       default "drivers/video/logo/logo_sgi_clut224.ppm" if SGI_IP22 || SGI_IP27 || SGI_IP32
> +       default "drivers/video/logo/logo_sun_clut224.ppm" if SPARC
> +       default "drivers/video/logo/logo_superh_clut224.ppm" if SUPERH
>         default "drivers/video/logo/logo_linux_clut224.ppm"
>         help
>           Takes a path to a 224-color logo in the portable pixmap file

> --- a/drivers/video/logo/logo.c
> +++ b/drivers/video/logo/logo.c
> @@ -48,59 +48,21 @@ const struct linux_logo * __ref fb_find_logo(int depth)
>         if (nologo || logos_freed)
>                 return NULL;
>
> -       if (depth >= 1) {
>  #ifdef CONFIG_LOGO_LINUX_MONO
> -               /* Generic Linux logo */
> +       if (depth >= 1)
>                 logo = &logo_linux_mono;
>  #endif
> -#ifdef CONFIG_LOGO_SUPERH_MONO
> -               /* SuperH Linux logo */
> -               logo = &logo_superh_mono;
> -#endif
> -       }
>
> -       if (depth >= 4) {
>  #ifdef CONFIG_LOGO_LINUX_VGA16
> -               /* Generic Linux logo */
> +       if (depth >= 4)
>                 logo = &logo_linux_vga16;
>  #endif
> -#ifdef CONFIG_LOGO_SUPERH_VGA16
> -               /* SuperH Linux logo */
> -               logo = &logo_superh_vga16;
> -#endif
> -       }
>
> -       if (depth >= 8) {
>  #ifdef CONFIG_LOGO_LINUX_CLUT224
> -               /* Generic Linux logo */
> +       if (depth >= 8)
>                 logo = &logo_linux_clut224;
>  #endif
> -#ifdef CONFIG_LOGO_DEC_CLUT224
> -               /* DEC Linux logo on MIPS/MIPS64 or ALPHA */
> -               logo = &logo_dec_clut224;
> -#endif
> -#ifdef CONFIG_LOGO_MAC_CLUT224
> -               /* Macintosh Linux logo on m68k */
> -               if (MACH_IS_MAC)

MACH_IS_MAC can be a runtime check.

> -                       logo = &logo_mac_clut224;
> -#endif
> -#ifdef CONFIG_LOGO_PARISC_CLUT224
> -               /* PA-RISC Linux logo */
> -               logo = &logo_parisc_clut224;
> -#endif
> -#ifdef CONFIG_LOGO_SGI_CLUT224
> -               /* SGI Linux logo on MIPS/MIPS64 */
> -               logo = &logo_sgi_clut224;
> -#endif
> -#ifdef CONFIG_LOGO_SUN_CLUT224
> -               /* Sun Linux logo */
> -               logo = &logo_sun_clut224;
> -#endif
> -#ifdef CONFIG_LOGO_SUPERH_CLUT224
> -               /* SuperH Linux logo */
> -               logo = &logo_superh_clut224;
> -#endif
> -       }
> +
>         return logo;
>  }
>  EXPORT_SYMBOL_GPL(fb_find_logo);

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Re: [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Vincent Mailhol 1 month ago
On 06/01/2026 at 12:48, Geert Uytterhoeven wrote:
> Hi Vincent,
> 
> CC linux-m68k
> 
> Thanks for your patch, which is now commit bd710b3da7308cb1
> ("video/logo: move logo selection logic to Kconfig") in fbdev/for-next.
> 
> On Thu, 1 Jan 2026 at 16:26, Vincent Mailhol <mailhol@kernel.org> wrote:
>> 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.
> 
> This may do the wrong thing when booting a multi-platform kernel.
> 
>>
>> 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>
> 
>> --- a/drivers/video/logo/Kconfig
>> +++ b/drivers/video/logo/Kconfig
> 
>> @@ -61,6 +63,12 @@ config LOGO_LINUX_CLUT224
>>  config LOGO_LINUX_CLUT224_FILE
>>         string "224-color logo .ppm file"
>>         depends on LOGO_LINUX_CLUT224
>> +       default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
>> +       default "drivers/video/logo/logo_mac_clut224.ppm" if MAC
> 
> E.g. an m68k multi-platform kernel including Mac support will scare
> non-Mac users into thinking their machine was assimilated by the
> Apple Empire...
> 
>> +       default "drivers/video/logo/logo_parisc_clut224.ppm" if PARISC
>> +       default "drivers/video/logo/logo_sgi_clut224.ppm" if SGI_IP22 || SGI_IP27 || SGI_IP32
>> +       default "drivers/video/logo/logo_sun_clut224.ppm" if SPARC
>> +       default "drivers/video/logo/logo_superh_clut224.ppm" if SUPERH
>>         default "drivers/video/logo/logo_linux_clut224.ppm"
>>         help
>>           Takes a path to a 224-color logo in the portable pixmap file
> 
>> --- a/drivers/video/logo/logo.c
>> +++ b/drivers/video/logo/logo.c
>> @@ -48,59 +48,21 @@ const struct linux_logo * __ref fb_find_logo(int depth)
>>         if (nologo || logos_freed)
>>                 return NULL;
>>
>> -       if (depth >= 1) {
>>  #ifdef CONFIG_LOGO_LINUX_MONO
>> -               /* Generic Linux logo */
>> +       if (depth >= 1)
>>                 logo = &logo_linux_mono;
>>  #endif
>> -#ifdef CONFIG_LOGO_SUPERH_MONO
>> -               /* SuperH Linux logo */
>> -               logo = &logo_superh_mono;
>> -#endif
>> -       }
>>
>> -       if (depth >= 4) {
>>  #ifdef CONFIG_LOGO_LINUX_VGA16
>> -               /* Generic Linux logo */
>> +       if (depth >= 4)
>>                 logo = &logo_linux_vga16;
>>  #endif
>> -#ifdef CONFIG_LOGO_SUPERH_VGA16
>> -               /* SuperH Linux logo */
>> -               logo = &logo_superh_vga16;
>> -#endif
>> -       }
>>
>> -       if (depth >= 8) {
>>  #ifdef CONFIG_LOGO_LINUX_CLUT224
>> -               /* Generic Linux logo */
>> +       if (depth >= 8)
>>                 logo = &logo_linux_clut224;
>>  #endif
>> -#ifdef CONFIG_LOGO_DEC_CLUT224
>> -               /* DEC Linux logo on MIPS/MIPS64 or ALPHA */
>> -               logo = &logo_dec_clut224;
>> -#endif
>> -#ifdef CONFIG_LOGO_MAC_CLUT224
>> -               /* Macintosh Linux logo on m68k */
>> -               if (MACH_IS_MAC)
> 
> MACH_IS_MAC can be a runtime check.

OK. I missed this.

I think there are two options to fix this:

  1. Keep CONFIG_LOGO_MAC_CLUT224 untouched
  2. Remove logo_mac_clut224.ppm

The first option is less controversial but I would like to ask you what
you think about removing the logo_mac_clut224 file.

Here, we are speaking of the Macintosh 68k which ended sales in 1995,
right? So the user base should be rather small, I guess.

And people who still want the custom MAC logo would still be able to add

  CONFIG_LOGO_MAC_CLUT224="path/to/logo_mac_clut224.ppm"

to their config to restore the old behaviour anyway.

My choice would go more toward the removal option but what do you think?


>> -                       logo = &logo_mac_clut224;
>> -#endif
>> -#ifdef CONFIG_LOGO_PARISC_CLUT224
>> -               /* PA-RISC Linux logo */
>> -               logo = &logo_parisc_clut224;
>> -#endif
>> -#ifdef CONFIG_LOGO_SGI_CLUT224
>> -               /* SGI Linux logo on MIPS/MIPS64 */
>> -               logo = &logo_sgi_clut224;
>> -#endif
>> -#ifdef CONFIG_LOGO_SUN_CLUT224
>> -               /* Sun Linux logo */
>> -               logo = &logo_sun_clut224;
>> -#endif
>> -#ifdef CONFIG_LOGO_SUPERH_CLUT224
>> -               /* SuperH Linux logo */
>> -               logo = &logo_superh_clut224;
>> -#endif
>> -       }
>> +
>>         return logo;
>>  }
>>  EXPORT_SYMBOL_GPL(fb_find_logo);


Yours sincerely,
Vincent Mailhol
Re: [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Geert Uytterhoeven 1 month ago
Hi Vincent,

On Tue, 6 Jan 2026 at 21:10, Vincent Mailhol <mailhol@kernel.org> wrote:
> On 06/01/2026 at 12:48, Geert Uytterhoeven wrote:
> > Thanks for your patch, which is now commit bd710b3da7308cb1
> > ("video/logo: move logo selection logic to Kconfig") in fbdev/for-next.
> >
> > On Thu, 1 Jan 2026 at 16:26, Vincent Mailhol <mailhol@kernel.org> wrote:
> >> 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.
> >
> > This may do the wrong thing when booting a multi-platform kernel.
> >
> >>
> >> 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>
> >
> >> --- a/drivers/video/logo/Kconfig
> >> +++ b/drivers/video/logo/Kconfig
> >
> >> @@ -61,6 +63,12 @@ config LOGO_LINUX_CLUT224
> >>  config LOGO_LINUX_CLUT224_FILE
> >>         string "224-color logo .ppm file"
> >>         depends on LOGO_LINUX_CLUT224
> >> +       default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
> >> +       default "drivers/video/logo/logo_mac_clut224.ppm" if MAC
> >
> > E.g. an m68k multi-platform kernel including Mac support will scare
> > non-Mac users into thinking their machine was assimilated by the
> > Apple Empire...
> >
> >> +       default "drivers/video/logo/logo_parisc_clut224.ppm" if PARISC
> >> +       default "drivers/video/logo/logo_sgi_clut224.ppm" if SGI_IP22 || SGI_IP27 || SGI_IP32
> >> +       default "drivers/video/logo/logo_sun_clut224.ppm" if SPARC
> >> +       default "drivers/video/logo/logo_superh_clut224.ppm" if SUPERH
> >>         default "drivers/video/logo/logo_linux_clut224.ppm"
> >>         help
> >>           Takes a path to a 224-color logo in the portable pixmap file
> >
> >> --- a/drivers/video/logo/logo.c
> >> +++ b/drivers/video/logo/logo.c
> >> @@ -48,59 +48,21 @@ const struct linux_logo * __ref fb_find_logo(int depth)
> >>         if (nologo || logos_freed)
> >>                 return NULL;
> >>
> >> -       if (depth >= 1) {
> >>  #ifdef CONFIG_LOGO_LINUX_MONO
> >> -               /* Generic Linux logo */
> >> +       if (depth >= 1)
> >>                 logo = &logo_linux_mono;
> >>  #endif
> >> -#ifdef CONFIG_LOGO_SUPERH_MONO
> >> -               /* SuperH Linux logo */
> >> -               logo = &logo_superh_mono;
> >> -#endif
> >> -       }
> >>
> >> -       if (depth >= 4) {
> >>  #ifdef CONFIG_LOGO_LINUX_VGA16
> >> -               /* Generic Linux logo */
> >> +       if (depth >= 4)
> >>                 logo = &logo_linux_vga16;
> >>  #endif
> >> -#ifdef CONFIG_LOGO_SUPERH_VGA16
> >> -               /* SuperH Linux logo */
> >> -               logo = &logo_superh_vga16;
> >> -#endif
> >> -       }
> >>
> >> -       if (depth >= 8) {
> >>  #ifdef CONFIG_LOGO_LINUX_CLUT224
> >> -               /* Generic Linux logo */
> >> +       if (depth >= 8)
> >>                 logo = &logo_linux_clut224;
> >>  #endif
> >> -#ifdef CONFIG_LOGO_DEC_CLUT224
> >> -               /* DEC Linux logo on MIPS/MIPS64 or ALPHA */
> >> -               logo = &logo_dec_clut224;
> >> -#endif
> >> -#ifdef CONFIG_LOGO_MAC_CLUT224
> >> -               /* Macintosh Linux logo on m68k */
> >> -               if (MACH_IS_MAC)
> >
> > MACH_IS_MAC can be a runtime check.
>
> OK. I missed this.
>
> I think there are two options to fix this:
>
>   1. Keep CONFIG_LOGO_MAC_CLUT224 untouched
>   2. Remove logo_mac_clut224.ppm
>
> The first option is less controversial but I would like to ask you what
> you think about removing the logo_mac_clut224 file.
>
> Here, we are speaking of the Macintosh 68k which ended sales in 1995,
> right? So the user base should be rather small, I guess.

Yes, the user base is small.

BTW, the only reason you don't have this issue with MACH_DECSTATION and
the various SGI_IP* options is that MIPS does not support multi-platform
kernels.

> And people who still want the custom MAC logo would still be able to add
>
>   CONFIG_LOGO_MAC_CLUT224="path/to/logo_mac_clut224.ppm"

LOGO_LINUX_CLUT224_FILE ;-)

> to their config to restore the old behaviour anyway.
>
> My choice would go more toward the removal option but what do you think?

I am not too attached to keeping the dynamic behavior for the Mac logo,
I just wanted to point out the impact.
I expect most people who care about logos (in products) just have their
own custom out-of-tree code.  As fb_find_logo() and the underlying
infrastructure still exists, I don't expect them to have too much
trouble forward porting that to newer kernels.

What do other people think?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Re: [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Helge Deller 1 month ago
On 1/7/26 11:36, Geert Uytterhoeven wrote:
> Hi Vincent,
> 
> On Tue, 6 Jan 2026 at 21:10, Vincent Mailhol <mailhol@kernel.org> wrote:
>> On 06/01/2026 at 12:48, Geert Uytterhoeven wrote:
>>> Thanks for your patch, which is now commit bd710b3da7308cb1
>>> ("video/logo: move logo selection logic to Kconfig") in fbdev/for-next.
>>>
>>> On Thu, 1 Jan 2026 at 16:26, Vincent Mailhol <mailhol@kernel.org> wrote:
>>>> 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.
>>>
>>> This may do the wrong thing when booting a multi-platform kernel.
>>>
>>>>
>>>> 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>
>>>
>>>> --- a/drivers/video/logo/Kconfig
>>>> +++ b/drivers/video/logo/Kconfig
>>>
>>>> @@ -61,6 +63,12 @@ config LOGO_LINUX_CLUT224
>>>>   config LOGO_LINUX_CLUT224_FILE
>>>>          string "224-color logo .ppm file"
>>>>          depends on LOGO_LINUX_CLUT224
>>>> +       default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
>>>> +       default "drivers/video/logo/logo_mac_clut224.ppm" if MAC
>>>
>>> E.g. an m68k multi-platform kernel including Mac support will scare
>>> non-Mac users into thinking their machine was assimilated by the
>>> Apple Empire...
>>>
>>>> +       default "drivers/video/logo/logo_parisc_clut224.ppm" if PARISC
>>>> +       default "drivers/video/logo/logo_sgi_clut224.ppm" if SGI_IP22 || SGI_IP27 || SGI_IP32
>>>> +       default "drivers/video/logo/logo_sun_clut224.ppm" if SPARC
>>>> +       default "drivers/video/logo/logo_superh_clut224.ppm" if SUPERH
>>>>          default "drivers/video/logo/logo_linux_clut224.ppm"
>>>>          help
>>>>            Takes a path to a 224-color logo in the portable pixmap file
>>>
>>>> --- a/drivers/video/logo/logo.c
>>>> +++ b/drivers/video/logo/logo.c
>>>> @@ -48,59 +48,21 @@ const struct linux_logo * __ref fb_find_logo(int depth)
>>>>          if (nologo || logos_freed)
>>>>                  return NULL;
>>>>
>>>> -       if (depth >= 1) {
>>>>   #ifdef CONFIG_LOGO_LINUX_MONO
>>>> -               /* Generic Linux logo */
>>>> +       if (depth >= 1)
>>>>                  logo = &logo_linux_mono;
>>>>   #endif
>>>> -#ifdef CONFIG_LOGO_SUPERH_MONO
>>>> -               /* SuperH Linux logo */
>>>> -               logo = &logo_superh_mono;
>>>> -#endif
>>>> -       }
>>>>
>>>> -       if (depth >= 4) {
>>>>   #ifdef CONFIG_LOGO_LINUX_VGA16
>>>> -               /* Generic Linux logo */
>>>> +       if (depth >= 4)
>>>>                  logo = &logo_linux_vga16;
>>>>   #endif
>>>> -#ifdef CONFIG_LOGO_SUPERH_VGA16
>>>> -               /* SuperH Linux logo */
>>>> -               logo = &logo_superh_vga16;
>>>> -#endif
>>>> -       }
>>>>
>>>> -       if (depth >= 8) {
>>>>   #ifdef CONFIG_LOGO_LINUX_CLUT224
>>>> -               /* Generic Linux logo */
>>>> +       if (depth >= 8)
>>>>                  logo = &logo_linux_clut224;
>>>>   #endif
>>>> -#ifdef CONFIG_LOGO_DEC_CLUT224
>>>> -               /* DEC Linux logo on MIPS/MIPS64 or ALPHA */
>>>> -               logo = &logo_dec_clut224;
>>>> -#endif
>>>> -#ifdef CONFIG_LOGO_MAC_CLUT224
>>>> -               /* Macintosh Linux logo on m68k */
>>>> -               if (MACH_IS_MAC)
>>>
>>> MACH_IS_MAC can be a runtime check.
>>
>> OK. I missed this.
>>
>> I think there are two options to fix this:
>>
>>    1. Keep CONFIG_LOGO_MAC_CLUT224 untouched
>>    2. Remove logo_mac_clut224.ppm
>>
>> The first option is less controversial but I would like to ask you what
>> you think about removing the logo_mac_clut224 file.
>>
>> Here, we are speaking of the Macintosh 68k which ended sales in 1995,
>> right? So the user base should be rather small, I guess.
> 
> Yes, the user base is small.
> 
> BTW, the only reason you don't have this issue with MACH_DECSTATION and
> the various SGI_IP* options is that MIPS does not support multi-platform
> kernels.
> 
>> And people who still want the custom MAC logo would still be able to add
>>
>>    CONFIG_LOGO_MAC_CLUT224="path/to/logo_mac_clut224.ppm"
> 
> LOGO_LINUX_CLUT224_FILE ;-)
> 
>> to their config to restore the old behaviour anyway.
>>
>> My choice would go more toward the removal option but what do you think?
> 
> I am not too attached to keeping the dynamic behavior for the Mac logo,
> I just wanted to point out the impact.
> I expect most people who care about logos (in products) just have their
> own custom out-of-tree code.  As fb_find_logo() and the underlying
> infrastructure still exists, I don't expect them to have too much
> trouble forward porting that to newer kernels.
> 
> What do other people think?

This is about a small visible icon. It's not some relevant feature.
So, I think it's unfortunate that the patch then drops the specific mac logo.
But adding additional coding and complexity to simply make this logo
visible for such a small user base IMHO does not justify the effort.

Helge
Re: [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Geert Uytterhoeven 1 month ago
Hi Helge,

On Wed, 7 Jan 2026 at 13:21, Helge Deller <deller@gmx.de> wrote:
> On 1/7/26 11:36, Geert Uytterhoeven wrote:
> > On Tue, 6 Jan 2026 at 21:10, Vincent Mailhol <mailhol@kernel.org> wrote:
> >> On 06/01/2026 at 12:48, Geert Uytterhoeven wrote:
> >>> Thanks for your patch, which is now commit bd710b3da7308cb1
> >>> ("video/logo: move logo selection logic to Kconfig") in fbdev/for-next.
> >>>
> >>> On Thu, 1 Jan 2026 at 16:26, Vincent Mailhol <mailhol@kernel.org> wrote:
> >>>> 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.
> >>>
> >>> This may do the wrong thing when booting a multi-platform kernel.
> >>>
> >>>>
> >>>> 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>
> >>>
> >>>> --- a/drivers/video/logo/Kconfig
> >>>> +++ b/drivers/video/logo/Kconfig
> >>>
> >>>> @@ -61,6 +63,12 @@ config LOGO_LINUX_CLUT224
> >>>>   config LOGO_LINUX_CLUT224_FILE
> >>>>          string "224-color logo .ppm file"
> >>>>          depends on LOGO_LINUX_CLUT224
> >>>> +       default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
> >>>> +       default "drivers/video/logo/logo_mac_clut224.ppm" if MAC
> >>>
> >>> E.g. an m68k multi-platform kernel including Mac support will scare
> >>> non-Mac users into thinking their machine was assimilated by the
> >>> Apple Empire...

> >>>> --- a/drivers/video/logo/logo.c
> >>>> +++ b/drivers/video/logo/logo.c

> >>>> -#ifdef CONFIG_LOGO_MAC_CLUT224
> >>>> -               /* Macintosh Linux logo on m68k */
> >>>> -               if (MACH_IS_MAC)
> >>>
> >>> MACH_IS_MAC can be a runtime check.
> >>
> >> OK. I missed this.
> >>
> >> I think there are two options to fix this:
> >>
> >>    1. Keep CONFIG_LOGO_MAC_CLUT224 untouched
> >>    2. Remove logo_mac_clut224.ppm
> >>
> >> The first option is less controversial but I would like to ask you what
> >> you think about removing the logo_mac_clut224 file.
> >>
> >> Here, we are speaking of the Macintosh 68k which ended sales in 1995,
> >> right? So the user base should be rather small, I guess.
> >
> > Yes, the user base is small.
> >
> > BTW, the only reason you don't have this issue with MACH_DECSTATION and
> > the various SGI_IP* options is that MIPS does not support multi-platform
> > kernels.
> >
> >> And people who still want the custom MAC logo would still be able to add
> >>
> >>    CONFIG_LOGO_MAC_CLUT224="path/to/logo_mac_clut224.ppm"
> >
> > LOGO_LINUX_CLUT224_FILE ;-)
> >
> >> to their config to restore the old behaviour anyway.
> >>
> >> My choice would go more toward the removal option but what do you think?
> >
> > I am not too attached to keeping the dynamic behavior for the Mac logo,
> > I just wanted to point out the impact.
> > I expect most people who care about logos (in products) just have their
> > own custom out-of-tree code.  As fb_find_logo() and the underlying
> > infrastructure still exists, I don't expect them to have too much
> > trouble forward porting that to newer kernels.
> >
> > What do other people think?
>
> This is about a small visible icon. It's not some relevant feature.
> So, I think it's unfortunate that the patch then drops the specific mac logo.
> But adding additional coding and complexity to simply make this logo
> visible for such a small user base IMHO does not justify the effort.

This patch does not drop the specific Mac logo.
Instead, it prioritizes the Mac logo over the generic logo when Mac
support is enabled in a multi-platform kernel.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Re: [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Vincent Mailhol 1 month ago
On 07/01/2026 at 14:53, Geert Uytterhoeven wrote:
> Hi Helge,
> 
> On Wed, 7 Jan 2026 at 13:21, Helge Deller <deller@gmx.de> wrote:
>> On 1/7/26 11:36, Geert Uytterhoeven wrote:
>>> On Tue, 6 Jan 2026 at 21:10, Vincent Mailhol <mailhol@kernel.org> wrote:
>>>> On 06/01/2026 at 12:48, Geert Uytterhoeven wrote:
>>>>> Thanks for your patch, which is now commit bd710b3da7308cb1
>>>>> ("video/logo: move logo selection logic to Kconfig") in fbdev/for-next.
>>>>>
>>>>> On Thu, 1 Jan 2026 at 16:26, Vincent Mailhol <mailhol@kernel.org> wrote:
>>>>>> 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.
>>>>>
>>>>> This may do the wrong thing when booting a multi-platform kernel.
>>>>>
>>>>>>
>>>>>> 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>
>>>>>
>>>>>> --- a/drivers/video/logo/Kconfig
>>>>>> +++ b/drivers/video/logo/Kconfig
>>>>>
>>>>>> @@ -61,6 +63,12 @@ config LOGO_LINUX_CLUT224
>>>>>>   config LOGO_LINUX_CLUT224_FILE
>>>>>>          string "224-color logo .ppm file"
>>>>>>          depends on LOGO_LINUX_CLUT224
>>>>>> +       default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
>>>>>> +       default "drivers/video/logo/logo_mac_clut224.ppm" if MAC
>>>>>
>>>>> E.g. an m68k multi-platform kernel including Mac support will scare
>>>>> non-Mac users into thinking their machine was assimilated by the
>>>>> Apple Empire...
> 
>>>>>> --- a/drivers/video/logo/logo.c
>>>>>> +++ b/drivers/video/logo/logo.c
> 
>>>>>> -#ifdef CONFIG_LOGO_MAC_CLUT224
>>>>>> -               /* Macintosh Linux logo on m68k */
>>>>>> -               if (MACH_IS_MAC)
>>>>>
>>>>> MACH_IS_MAC can be a runtime check.
>>>>
>>>> OK. I missed this.
>>>>
>>>> I think there are two options to fix this:
>>>>
>>>>    1. Keep CONFIG_LOGO_MAC_CLUT224 untouched
>>>>    2. Remove logo_mac_clut224.ppm
>>>>
>>>> The first option is less controversial but I would like to ask you what
>>>> you think about removing the logo_mac_clut224 file.
>>>>
>>>> Here, we are speaking of the Macintosh 68k which ended sales in 1995,
>>>> right? So the user base should be rather small, I guess.
>>>
>>> Yes, the user base is small.
>>>
>>> BTW, the only reason you don't have this issue with MACH_DECSTATION and
>>> the various SGI_IP* options is that MIPS does not support multi-platform
>>> kernels.
>>>
>>>> And people who still want the custom MAC logo would still be able to add
>>>>
>>>>    CONFIG_LOGO_MAC_CLUT224="path/to/logo_mac_clut224.ppm"
>>>
>>> LOGO_LINUX_CLUT224_FILE ;-)

D'oh!

>>>> to their config to restore the old behaviour anyway.
>>>>
>>>> My choice would go more toward the removal option but what do you think?
>>>
>>> I am not too attached to keeping the dynamic behavior for the Mac logo,
>>> I just wanted to point out the impact.
>>> I expect most people who care about logos (in products) just have their
>>> own custom out-of-tree code.  As fb_find_logo() and the underlying
>>> infrastructure still exists, I don't expect them to have too much
>>> trouble forward porting that to newer kernels.
>>>
>>> What do other people think?
>>
>> This is about a small visible icon. It's not some relevant feature.
>> So, I think it's unfortunate that the patch then drops the specific mac logo.
>> But adding additional coding and complexity to simply make this logo
>> visible for such a small user base IMHO does not justify the effort.
> 
> This patch does not drop the specific Mac logo.
> Instead, it prioritizes the Mac logo over the generic logo when Mac
> support is enabled in a multi-platform kernel.

It seems that there is a consensus between the three of us that we can
drop the MAC logo.

I will send right away a v3 with will contain one extra patch to drop
the Macintosh logo with a note in the patch of how to restore it using
LOGO_LINUX_CLUT224_FILE.


Yours sincerely,
Vincent Mailhol
Re: [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Finn Thain 1 month ago
On Tue, 6 Jan 2026, Vincent Mailhol wrote:

> > 
> > MACH_IS_MAC can be a runtime check.
> 
> OK. I missed this.
> 

You can use "qemu-system-m68k -M q800 ..." to run the code you're 
interested in.

$ qemu-system-m68k -M q800 -g 800x600x16
qemu-system-m68k: unknown display mode: width 800, height 600, depth 16
Available modes:
    640x480x1
    640x480x2
    640x480x4
    640x480x8
    640x480x24
    800x600x1
    800x600x2
    800x600x4
    800x600x8
    800x600x24
    1152x870x1
    1152x870x2
    1152x870x4
    1152x870x8
Re: [PATCH v2 6/6] video/logo: move logo selection logic to Kconfig
Posted by Daniel Palmer 1 month ago
On Tue, 6 Jan 2026 at 20:54, Geert Uytterhoeven <geert@linux-m68k.org> wrote:

> E.g. an m68k multi-platform kernel including Mac support will scare
> non-Mac users into thinking their machine was assimilated by the
> Apple Empire...
>

This is actually how I tell if my Amiga or Mac is currently connected
to my monitor... Amiga has the normal tux, Mac has the tux inside of a
monitor.