* Re: [PATCH v3 3/4] fbdev: omapfb: Make FB_DEVICE dependency optional
From: Andy Shevchenko @ 2025-12-30 22:42 UTC (permalink / raw)
To: Chintan Patel
Cc: Andy Shevchenko, linux-fbdev, linux-staging, linux-omap,
linux-kernel, dri-devel, tzimmermann, andy, deller, gregkh
In-Reply-To: <081b59e8-e74b-4af6-bd31-00ebb4e12e5c@gmail.com>
On Tue, Dec 30, 2025 at 8:01 PM Chintan Patel <chintanlike@gmail.com> wrote:
> On 12/30/25 03:37, Andy Shevchenko wrote:
> > On Mon, Dec 29, 2025 at 09:28:21PM -0800, Chintan Patel wrote:
...
> > Still the same issue I pointed out in v2 review.
> Sorry about that. I had actually made your suggested changes but somehow
> I mistakenly send old patches instead of updated one. I will send
> updated one. Should I send v4 or v3 is fine?
v4 needs to be sent.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* [PATCH 6/6] video/logo: move logo selection logic to Kconfig
From: Vincent Mailhol @ 2025-12-30 22:20 UTC (permalink / raw)
To: Helge Deller, Greg Kroah-Hartman, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz
Cc: linux-fbdev, dri-devel, linux-kernel, linux-sh, Vincent Mailhol
In-Reply-To: <20251230-custom-logo-v1-0-4736374569ee@kernel.org>
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.
Move all the logo file selection logic to Kbuild, this done, clean-up
the C code to only leave one entry for each logo type (monochrome,
16-colors and 224-colors).
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
drivers/video/logo/Kconfig | 49 +++++++++------------------------------------
drivers/video/logo/Makefile | 21 +------------------
drivers/video/logo/logo.c | 46 ++++--------------------------------------
include/linux/linux_logo.h | 9 ---------
4 files changed, 14 insertions(+), 111 deletions(-)
diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig
index 1d1651c067a1..9bf8f14c6856 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,13 @@ 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_spe_clut224.ppm" if SPU_BASE
default "drivers/video/logo/logo_linux_clut224.ppm"
help
Takes a path to a 224-color logo in the portable pixmap file
@@ -71,44 +80,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..c32238fddaa6 100644
--- a/drivers/video/logo/Makefile
+++ b/drivers/video/logo/Makefile
@@ -5,16 +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
# How to generate logo's
@@ -33,14 +23,5 @@ $(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)
-
# generated C files
-targets += *_mono.c *_vga16.c *_clut224.c
+targets += logo_linux_mono.c logo_linux_vga16.c logo_linux_clut224.c
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..d5a66af27fd9 100644
--- a/include/linux/linux_logo.h
+++ b/include/linux/linux_logo.h
@@ -33,15 +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);
#ifdef CONFIG_FB_LOGO_EXTRA
--
2.51.2
^ permalink raw reply related
* [PATCH 5/6] sh: defconfig: remove CONFIG_LOGO_SUPERH_*
From: Vincent Mailhol @ 2025-12-30 22:20 UTC (permalink / raw)
To: Helge Deller, Greg Kroah-Hartman, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz
Cc: linux-fbdev, dri-devel, linux-kernel, linux-sh, Vincent Mailhol
In-Reply-To: <20251230-custom-logo-v1-0-4736374569ee@kernel.org>
CONFIG_LOGO_SUPERH_MONO, CONFIG_LOGO_SUPERH_VGA16 and
CONFIG_LOGO_SUPERH_CLUT224 will be removed in an upcoming change but
are still referenced in some of the defconfig.
Remove all the occurrences of CONFIG_LOGO_SUPERH_*.
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
arch/sh/configs/dreamcast_defconfig | 2 --
arch/sh/configs/ecovec24_defconfig | 2 --
arch/sh/configs/kfr2r09_defconfig | 2 --
arch/sh/configs/migor_defconfig | 2 --
arch/sh/configs/rts7751r2d1_defconfig | 2 --
arch/sh/configs/rts7751r2dplus_defconfig | 2 --
arch/sh/configs/se7724_defconfig | 2 --
arch/sh/configs/se7780_defconfig | 2 --
arch/sh/configs/sh7785lcr_defconfig | 3 ---
arch/sh/configs/urquell_defconfig | 3 ---
10 files changed, 22 deletions(-)
diff --git a/arch/sh/configs/dreamcast_defconfig b/arch/sh/configs/dreamcast_defconfig
index 4573d5d64989..dd58797e8298 100644
--- a/arch/sh/configs/dreamcast_defconfig
+++ b/arch/sh/configs/dreamcast_defconfig
@@ -60,8 +60,6 @@ CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
# CONFIG_DNOTIFY is not set
CONFIG_PROC_KCORE=y
CONFIG_TMPFS=y
diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig
index 458115d83184..e751933ac840 100644
--- a/arch/sh/configs/ecovec24_defconfig
+++ b/arch/sh/configs/ecovec24_defconfig
@@ -78,8 +78,6 @@ CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
CONFIG_SOUND=y
CONFIG_SND=y
CONFIG_SND_SEQUENCER=y
diff --git a/arch/sh/configs/kfr2r09_defconfig b/arch/sh/configs/kfr2r09_defconfig
index d80e83e7ec38..056ba52600f9 100644
--- a/arch/sh/configs/kfr2r09_defconfig
+++ b/arch/sh/configs/kfr2r09_defconfig
@@ -66,8 +66,6 @@ CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_CLUT224 is not set
CONFIG_USB_GADGET=y
CONFIG_USB_CDC_COMPOSITE=m
CONFIG_MMC=y
diff --git a/arch/sh/configs/migor_defconfig b/arch/sh/configs/migor_defconfig
index 7cdaa909ffd6..1d9d543eef4c 100644
--- a/arch/sh/configs/migor_defconfig
+++ b/arch/sh/configs/migor_defconfig
@@ -71,8 +71,6 @@ CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_CLUT224 is not set
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_M66592=y
CONFIG_USB_G_SERIAL=m
diff --git a/arch/sh/configs/rts7751r2d1_defconfig b/arch/sh/configs/rts7751r2d1_defconfig
index 0c54ab2b06e6..745490d4807f 100644
--- a/arch/sh/configs/rts7751r2d1_defconfig
+++ b/arch/sh/configs/rts7751r2d1_defconfig
@@ -50,8 +50,6 @@ CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
CONFIG_SOUND=y
CONFIG_SND=m
CONFIG_SND_YMFPCI=m
diff --git a/arch/sh/configs/rts7751r2dplus_defconfig b/arch/sh/configs/rts7751r2dplus_defconfig
index 3173b616b2cb..cd90f5354459 100644
--- a/arch/sh/configs/rts7751r2dplus_defconfig
+++ b/arch/sh/configs/rts7751r2dplus_defconfig
@@ -55,8 +55,6 @@ CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
CONFIG_SOUND=y
CONFIG_SND=m
CONFIG_SND_YMFPCI=m
diff --git a/arch/sh/configs/se7724_defconfig b/arch/sh/configs/se7724_defconfig
index 8ca46d704c8b..9b4f8f3a1fdf 100644
--- a/arch/sh/configs/se7724_defconfig
+++ b/arch/sh/configs/se7724_defconfig
@@ -79,8 +79,6 @@ CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
# CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
CONFIG_SOUND=y
CONFIG_SND=m
# CONFIG_SND_DRIVERS is not set
diff --git a/arch/sh/configs/se7780_defconfig b/arch/sh/configs/se7780_defconfig
index 12463b766120..13fa6a59b8f1 100644
--- a/arch/sh/configs/se7780_defconfig
+++ b/arch/sh/configs/se7780_defconfig
@@ -66,8 +66,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
CONFIG_SOUND=y
CONFIG_SOUND_PRIME=y
CONFIG_HID_A4TECH=y
diff --git a/arch/sh/configs/sh7785lcr_defconfig b/arch/sh/configs/sh7785lcr_defconfig
index 2fcf50d8c820..8738c590d5a0 100644
--- a/arch/sh/configs/sh7785lcr_defconfig
+++ b/arch/sh/configs/sh7785lcr_defconfig
@@ -60,9 +60,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
-# CONFIG_LOGO_SUPERH_CLUT224 is not set
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_defconfig
index f51ff6b1ec38..e7924db29b69 100644
--- a/arch/sh/configs/urquell_defconfig
+++ b/arch/sh/configs/urquell_defconfig
@@ -86,9 +86,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
CONFIG_LOGO=y
# CONFIG_LOGO_LINUX_MONO is not set
# CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
-# CONFIG_LOGO_SUPERH_CLUT224 is not set
CONFIG_HID_A4TECH=y
CONFIG_HID_APPLE=y
CONFIG_HID_BELKIN=y
--
2.51.2
^ permalink raw reply related
* [PATCH 4/6] newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224
From: Vincent Mailhol @ 2025-12-30 22:20 UTC (permalink / raw)
To: Helge Deller, Greg Kroah-Hartman, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz
Cc: linux-fbdev, dri-devel, linux-kernel, linux-sh, Vincent Mailhol
In-Reply-To: <20251230-custom-logo-v1-0-4736374569ee@kernel.org>
newport_show_logo() is only activated if CONFIG_LOGO_LINUX_CLUT224 is
set (otherwise it is a NOP). This configuration value will be removed
in an upcoming change so instead, make it depend on LOGO_LINUX_CLUT224.
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
drivers/video/console/newport_con.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/video/console/newport_con.c b/drivers/video/console/newport_con.c
index 242415366074..337e04236d6d 100644
--- a/drivers/video/console/newport_con.c
+++ b/drivers/video/console/newport_con.c
@@ -95,7 +95,7 @@ static inline void newport_init_cmap(void)
static const struct linux_logo *newport_show_logo(void)
{
-#ifdef CONFIG_LOGO_SGI_CLUT224
+#ifdef CONFIG_LOGO_LINUX_CLUT224
const struct linux_logo *logo = fb_find_logo(8);
const unsigned char *clut;
const unsigned char *data;
@@ -127,7 +127,7 @@ static const struct linux_logo *newport_show_logo(void)
return logo;
#else
return NULL;
-#endif /* CONFIG_LOGO_SGI_CLUT224 */
+#endif /* CONFIG_LOGO_LINUX_CLUT224 */
}
static inline void newport_clear_screen(int xstart, int ystart, int xend,
--
2.51.2
^ permalink raw reply related
* [PATCH 3/6] video/logo: allow custom logo
From: Vincent Mailhol @ 2025-12-30 22:20 UTC (permalink / raw)
To: Helge Deller, Greg Kroah-Hartman, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz
Cc: linux-fbdev, dri-devel, linux-kernel, linux-sh, Vincent Mailhol
In-Reply-To: <20251230-custom-logo-v1-0-4736374569ee@kernel.org>
Some people like to replace the default Tux boot logo by an image of
their own. There exist a few tutorials here [1] and there [2]. But
this requires modifying the sources which is a bit cumbersome.
Add a string entry in Kbuild for each of the logo categories
(monochrome, 16-colors, 224-colors). The string entry takes a path to
a .pbm or .ppm image allowing the user to more easily provide a custom
logo without having to modify the sources.
Add an help entry with a short hint on how to convert images to the
portable pixmap file format.
Update the Makefile accordingly. When converted to .c file, the logo
will have one of these fixed file name:
- logo_linux_mono.c
- logo_linux_vga16.c
- logo_linux_clut224.c:
depending on the image type and this regardless of the name of the
.pgm/.ppm source filename. This will allow for further simplifications
in an upcoming change.
[1] ArmadeuS Project wiki -- Linux Boot Logo
Link: https://www.armadeus.org/wiki/index.php?title=Linux_Boot_Logo
[2] Timesys -- How To Use a Custom Boot Logo / Splash Screen
Link: https://linuxlink.timesys.com/docs/wiki/engineering/HOWTO_Use_a_custom_boot_logo
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
drivers/video/logo/Kconfig | 41 +++++++++++++++++++++++++++++++++++++++++
drivers/video/logo/Makefile | 11 ++++++++++-
2 files changed, 51 insertions(+), 1 deletion(-)
diff --git a/drivers/video/logo/Kconfig b/drivers/video/logo/Kconfig
index ce6bb753522d..1d1651c067a1 100644
--- a/drivers/video/logo/Kconfig
+++ b/drivers/video/logo/Kconfig
@@ -22,14 +22,55 @@ config LOGO_LINUX_MONO
bool "Standard black and white Linux logo"
default y
+config LOGO_LINUX_MONO_FILE
+ string "Monochrome logo .pbm file"
+ depends on LOGO_LINUX_MONO
+ default "drivers/video/logo/logo_linux_mono.pbm"
+ help
+ Takes a path to a monochromatic logo in the portable pixmap file
+ format (.pbm). This defaults to the Tux penguin.
+
+ For example, the below ImageMagick command can be used to reduce
+ an image to black and white and convert it into a pbm file:
+
+ magick source_image -compress none destination.pbm
+
config LOGO_LINUX_VGA16
bool "Standard 16-color Linux logo"
default y
+config LOGO_LINUX_VGA16_FILE
+ string "16-color logo .ppm file"
+ depends on LOGO_LINUX_VGA16
+ default "drivers/video/logo/logo_linux_vga16.ppm"
+ help
+ Takes a path to a logo in the portable pixmap file format (.ppm),
+ using the 16 colors from the drivers/video/logo/clut_vga16.ppm
+ palette. This defaults to the Tux penguin.
+
+ For example, the below ImageMagick command can be used to reduce an
+ image to the VGA 16 colors palette and convert into a ppm file:
+
+ magick source_image -compress none \
+ -remap drivers/video/logo/clut_vga16.ppm destination.ppm
+
config LOGO_LINUX_CLUT224
bool "Standard 224-color Linux logo"
default y
+config LOGO_LINUX_CLUT224_FILE
+ string "224-color logo .ppm file"
+ depends on LOGO_LINUX_CLUT224
+ default "drivers/video/logo/logo_linux_clut224.ppm"
+ help
+ Takes a path to a 224-color logo in the portable pixmap file
+ format (.ppm). This defaults to the Tux penguin.
+
+ For example, the below ImageMagick command can be used to reduce
+ an image palette to 224 colors and convert it into a ppm 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
diff --git a/drivers/video/logo/Makefile b/drivers/video/logo/Makefile
index 3f249e9dcf37..ac8e9da3f51a 100644
--- a/drivers/video/logo/Makefile
+++ b/drivers/video/logo/Makefile
@@ -22,7 +22,16 @@ hostprogs := pnmtologo
# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
quiet_cmd_logo = LOGO $@
- cmd_logo = $(obj)/pnmtologo -t $2 -n $* -o $@ $<
+ cmd_logo = $(obj)/pnmtologo -t $2 -n $(basename $(notdir $@)) -o $@ $<
+
+$(obj)/logo_linux_mono.c: $(CONFIG_LOGO_LINUX_MONO_FILE) $(obj)/pnmtologo FORCE
+ $(call if_changed,logo,mono)
+
+$(obj)/logo_linux_vga16.c: $(CONFIG_LOGO_LINUX_VGA16_FILE) $(obj)/pnmtologo FORCE
+ $(call if_changed,logo,vga16)
+
+$(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)
--
2.51.2
^ permalink raw reply related
* [PATCH 2/6] video/logo: add a type parameter to the logo makefile function
From: Vincent Mailhol @ 2025-12-30 22:20 UTC (permalink / raw)
To: Helge Deller, Greg Kroah-Hartman, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz
Cc: linux-fbdev, dri-devel, linux-kernel, linux-sh, Vincent Mailhol
In-Reply-To: <20251230-custom-logo-v1-0-4736374569ee@kernel.org>
When translating a portable pixmap file into a .c file, the pnmtologo
tool expects to receive the image type (either mono, vga16 or clut224)
as an argument under the -t option.
Currently, this information is stored in the file name. Because we
will allow for custom logo in an upcoming change, it is preferable to
decouple the image name from its type.
Add a new $2 parameter to the Makefile logo function which contains
the image type.
Update all the individual targets to provide this new argument. Note
that this transitional: all those targets will be removed in an
upcoming clean-up change.
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
drivers/video/logo/Makefile | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/drivers/video/logo/Makefile b/drivers/video/logo/Makefile
index 8b67c4941a4c..3f249e9dcf37 100644
--- a/drivers/video/logo/Makefile
+++ b/drivers/video/logo/Makefile
@@ -22,13 +22,16 @@ hostprogs := pnmtologo
# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
quiet_cmd_logo = LOGO $@
- cmd_logo = $(obj)/pnmtologo -t $(lastword $(subst _, ,$*)) -n $* -o $@ $<
+ cmd_logo = $(obj)/pnmtologo -t $2 -n $* -o $@ $<
$(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
- $(call if_changed,logo)
+ $(call if_changed,logo,mono)
-$(obj)/%.c: $(src)/%.ppm $(obj)/pnmtologo FORCE
- $(call if_changed,logo)
+$(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)
# generated C files
targets += *_mono.c *_vga16.c *_clut224.c
--
2.51.2
^ permalink raw reply related
* [PATCH 1/6] video/logo: remove orphan .pgm Makefile rule
From: Vincent Mailhol @ 2025-12-30 22:20 UTC (permalink / raw)
To: Helge Deller, Greg Kroah-Hartman, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz
Cc: linux-fbdev, dri-devel, linux-kernel, linux-sh, Vincent Mailhol
In-Reply-To: <20251230-custom-logo-v1-0-4736374569ee@kernel.org>
The kernel has no actual grey-scale logos. And looking at the git
history, it seems that there never was one (or maybe there was in the
pre-git history? I did not check that far…)
Remove the Makefile rule for the .pgm grey scale images.
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
drivers/video/logo/Makefile | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/video/logo/Makefile b/drivers/video/logo/Makefile
index 895c60b8402e..8b67c4941a4c 100644
--- a/drivers/video/logo/Makefile
+++ b/drivers/video/logo/Makefile
@@ -30,8 +30,5 @@ $(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
$(obj)/%.c: $(src)/%.ppm $(obj)/pnmtologo FORCE
$(call if_changed,logo)
-$(obj)/%.c: $(src)/%.pgm $(obj)/pnmtologo FORCE
- $(call if_changed,logo)
-
# generated C files
-targets += *_mono.c *_vga16.c *_clut224.c *_gray256.c
+targets += *_mono.c *_vga16.c *_clut224.c
--
2.51.2
^ permalink raw reply related
* [PATCH 0/6] video/logo: allow custom boot logo and simplify logic
From: Vincent Mailhol @ 2025-12-30 22:19 UTC (permalink / raw)
To: Helge Deller, Greg Kroah-Hartman, Yoshinori Sato, Rich Felker,
John Paul Adrian Glaubitz
Cc: linux-fbdev, dri-devel, linux-kernel, linux-sh, Vincent Mailhol
This series allows the user to replace the default kernel boot logo by
a custom one directly in the kernel configuration. This makes it
easier to customise the boot logo without the need to modify the
sources and allows such customisation to remain persistent after
applying the configuration to another version of the kernel.
Patch #1 and #2 are clean-up and preparation while patch #3 is the
main feature of this series: making the boot logo customisable.
While working on this, I realised that managing the logo file directly
in Kbuild allows us to simplify how we handle the different existing
variants of the Tux logo. This series thus ends with a clean-up which
moves all the logo selection logic to Kbuild, simplifying the Makefile
and C code.
Patch #4 and #5 do a tree-wide clean-up on the Kconfig symbols that
are to be removed in patch #6 and patch #6 simplify the logic as
explained above.
Signed-off-by: Vincent Mailhol <mailhol@kernel.org>
---
Vincent Mailhol (6):
video/logo: remove orphan .pgm Makefile rule
video/logo: add a type parameter to the logo makefile function
video/logo: allow custom logo
newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224
sh: defconfig: remove CONFIG_LOGO_SUPERH_*
video/logo: move logo selection logic to Kconfig
arch/sh/configs/dreamcast_defconfig | 2 -
arch/sh/configs/ecovec24_defconfig | 2 -
arch/sh/configs/kfr2r09_defconfig | 2 -
arch/sh/configs/migor_defconfig | 2 -
arch/sh/configs/rts7751r2d1_defconfig | 2 -
arch/sh/configs/rts7751r2dplus_defconfig | 2 -
arch/sh/configs/se7724_defconfig | 2 -
arch/sh/configs/se7780_defconfig | 2 -
arch/sh/configs/sh7785lcr_defconfig | 3 --
arch/sh/configs/urquell_defconfig | 3 --
drivers/video/console/newport_con.c | 4 +-
drivers/video/logo/Kconfig | 84 ++++++++++++++++++--------------
drivers/video/logo/Makefile | 26 +++-------
drivers/video/logo/logo.c | 46 ++---------------
include/linux/linux_logo.h | 9 ----
15 files changed, 61 insertions(+), 130 deletions(-)
---
base-commit: 8640b74557fc8b4c300030f6ccb8cd078f665ec8
change-id: 20251227-custom-logo-932df316a02c
Best regards,
--
Vincent Mailhol <mailhol@kernel.org>
^ permalink raw reply
* Re: [PATCH v3 4/4] fbdev: sh_mobile_lcdc: Make FB_DEVICE dependency optional
From: Chintan Patel @ 2025-12-30 18:25 UTC (permalink / raw)
To: Helge Deller; +Cc: linux-fbdev, linux-omap, linux-kernel, dri-devel
In-Reply-To: <aVOJovo-k6-0KnVg@carbonx1>
On 12/30/25 00:13, Helge Deller wrote:
> * Chintan Patel <chintanlike@gmail.com>:
>> The sh_mobile_lcdc driver exposes overlay configuration via sysfs, but the
>> core driver does not require CONFIG_FB_DEVICE.
>>
>> Make sysfs support optional by defining overlay_sysfs_groups conditionally
>> using PTR_IF(). The driver always sets .dev_groups, and the kernel
>> naturally skips NULL attribute groups while the code remains buildable
>> and type-checked.
>>
>> Suggested-by: Helge Deller <deller@gmx.de>
>> Signed-off-by: Chintan Patel <chintanlike@gmail.com>
>> ---
>> drivers/video/fbdev/sh_mobile_lcdcfb.c | 12 +++++++++++-
>> 1 file changed, 11 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
>> index dd950e4ab5ce..cb7ed1ff9165 100644
>> --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
>> +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
>> @@ -1350,7 +1350,17 @@ static struct attribute *overlay_sysfs_attrs[] = {
>> &dev_attr_overlay_rop3.attr,
>> NULL,
>> };
>> -ATTRIBUTE_GROUPS(overlay_sysfs);
>
> Instead of replacing the ^ ATTRIBUTE_GROUPS() by the code below,
> isn't it possible to just mark the overlay_sysfs_attrs[] array
> _maybe_unused, and just do:
> + #ifdef CONFIG_FB_DEVICE
> + ATTRIBUTE_GROUPS(overlay_sysfs);
> + #endif
>
> ?
Hi Helge,
Yes, the __maybe_unused + #ifdef ATTRIBUTE_GROUPS() approach would work.
I went with the PTR_IF(IS_ENABLED()) pattern because Andy suggested
using PTR_IF() to conditionally include overlay_sysfs_group in
overlay_sysfs_groups, and to keep .dev_groups always populated while
letting the device core skip NULL groups. This avoids conditional wiring
via #ifdef and keeps the code type-checked without CONFIG_FB_DEVICE.
If you still prefer the simpler #ifdef ATTRIBUTE_GROUPS() approach for
this driver, I can switch to that, but I wanted to follow Andy’s
guidance here.
Thanks!
^ permalink raw reply
* Re: [PATCH v3 3/4] fbdev: omapfb: Make FB_DEVICE dependency optional
From: Chintan Patel @ 2025-12-30 18:01 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-fbdev, linux-staging, linux-omap, linux-kernel, dri-devel,
tzimmermann, andy, deller, gregkh
In-Reply-To: <aVO5X0NKSdkH6Ab5@smile.fi.intel.com>
On 12/30/25 03:37, Andy Shevchenko wrote:
> On Mon, Dec 29, 2025 at 09:28:21PM -0800, Chintan Patel wrote:
>> omapfb provides several sysfs interfaces for framebuffer configuration
>> and debugging, but these are not required for the core driver.
>>
>> Remove the hard dependency on CONFIG_FB_DEVICE and make sysfs support
>> optional by using dev_of_fbinfo() to obtain the backing device at runtime.
>> When FB_DEVICE is disabled, sysfs operations are skipped while the code
>> still builds and is type-checked.
>
> ...
>
>> + struct device *dev = dev_of_fbinfo(fbdev->fbs[i]);
>
> Still the same issue I pointed out in v2 review.
>
>> int t;
>> +
>> + if (!dev)
>> + continue;
>
> ...
>
>> + struct device *dev = dev_of_fbinfo(fbdev->fbs[i]);
>> +
>> + if (!dev)
>> + continue;
>
> Ditto.
Sorry about that. I had actually made your suggested changes but somehow
I mistakenly send old patches instead of updated one. I will send
updated one. Should I send v4 or v3 is fine?
^ permalink raw reply
* Re: [PATCH v3 0/4] fbdev: Make CONFIG_FB_DEVICE optional for drivers
From: Chintan Patel @ 2025-12-30 17:59 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-fbdev, linux-staging, linux-omap, linux-kernel, dri-devel,
tzimmermann, andy, deller, gregkh
In-Reply-To: <aVO4pslXIvnc00J3@smile.fi.intel.com>
On 12/30/25 03:33, Andy Shevchenko wrote:
> On Mon, Dec 29, 2025 at 09:28:18PM -0800, Chintan Patel wrote:
>> This series makes CONFIG_FB_DEVICE optional for fbdev drivers that use
>> it only for sysfs interfaces, addressing Thomas Zimmermann’s TODO to
>> remove hard FB_DEVICE dependencies.
>>
>> The series introduces a small helper, dev_of_fbinfo(), which returns
>> NULL when CONFIG_FB_DEVICE=n. This allows sysfs code paths to be skipped
>> via runtime checks, avoids #ifdef CONFIG_FB_DEVICE clutter, and keeps
>> full compile-time syntax checking.
>
>> Signed-off-by: Chintan Patel <chintanlike@gmail.com>
>> ---
>> Changes in v3:
>> - Use PTR_IF() to conditionally include overlay_sysfs_group in
>> overlay_sysfs_groups
>> - Decouple variable definition and assignment in fbtft_sysfs_init/exit
>
> Any particular reasons you ignored my tag from v2?
>
Ah.. This is typo. I see what happened now. Looks like my script picked
wrong or old patches instead of new updated one. Should I send v4 or v4
is fine?
^ permalink raw reply
* Re: [PATCH] staging: sm750fb: fix const array warning
From: Greg KH @ 2025-12-30 12:51 UTC (permalink / raw)
To: Motti Kumar Babu
Cc: sudipm.mukherjee, teddy.wang, skhan, linux-kernel-mentees,
linux-fbdev, linux-staging, linux-kernel
In-Reply-To: <CAC9bbDKw-TGY81wecEnmhbMror0R=y8McTJGU5CPRf2N8UM9fQ@mail.gmail.com>
On Tue, Dec 30, 2025 at 05:42:43PM +0530, Motti Kumar Babu wrote:
> Hi Greg KH,
>
> Yes, I have verified this change with a test build.
>
> I ran make defconfig followed by make M=drivers/staging/sm750fb/ on the
> staging-testing branch, and the driver compiled successfully without any
> errors or new warnings.
defconfig will not enable this driver, are you sure you actually built
it?
And please do not top-post, or use html email.
thanks,
greg k-h
^ permalink raw reply
* Re: [PATCH v3 3/4] fbdev: omapfb: Make FB_DEVICE dependency optional
From: Andy Shevchenko @ 2025-12-30 11:37 UTC (permalink / raw)
To: Chintan Patel
Cc: linux-fbdev, linux-staging, linux-omap, linux-kernel, dri-devel,
tzimmermann, andy, deller, gregkh
In-Reply-To: <20251230052827.4676-4-chintanlike@gmail.com>
On Mon, Dec 29, 2025 at 09:28:21PM -0800, Chintan Patel wrote:
> omapfb provides several sysfs interfaces for framebuffer configuration
> and debugging, but these are not required for the core driver.
>
> Remove the hard dependency on CONFIG_FB_DEVICE and make sysfs support
> optional by using dev_of_fbinfo() to obtain the backing device at runtime.
> When FB_DEVICE is disabled, sysfs operations are skipped while the code
> still builds and is type-checked.
...
> + struct device *dev = dev_of_fbinfo(fbdev->fbs[i]);
Still the same issue I pointed out in v2 review.
> int t;
> +
> + if (!dev)
> + continue;
...
> + struct device *dev = dev_of_fbinfo(fbdev->fbs[i]);
> +
> + if (!dev)
> + continue;
Ditto.
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v3 4/4] fbdev: sh_mobile_lcdc: Make FB_DEVICE dependency optional
From: Andy Shevchenko @ 2025-12-30 11:35 UTC (permalink / raw)
To: Chintan Patel
Cc: linux-fbdev, linux-staging, linux-omap, linux-kernel, dri-devel,
tzimmermann, andy, deller, gregkh
In-Reply-To: <20251230052827.4676-5-chintanlike@gmail.com>
On Mon, Dec 29, 2025 at 09:28:22PM -0800, Chintan Patel wrote:
> The sh_mobile_lcdc driver exposes overlay configuration via sysfs, but the
> core driver does not require CONFIG_FB_DEVICE.
>
> Make sysfs support optional by defining overlay_sysfs_groups conditionally
> using PTR_IF(). The driver always sets .dev_groups, and the kernel
> naturally skips NULL attribute groups while the code remains buildable
> and type-checked.
...
> +static const struct attribute_group *overlay_sysfs_groups[] = {
> + PTR_IF(IS_ENABLED(CONFIG_FB_DEVICE), &overlay_sysfs_group),
> + NULL,
Please, drop comma at the end of the terminator entry.
> +};
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v3 0/4] fbdev: Make CONFIG_FB_DEVICE optional for drivers
From: Andy Shevchenko @ 2025-12-30 11:33 UTC (permalink / raw)
To: Chintan Patel
Cc: linux-fbdev, linux-staging, linux-omap, linux-kernel, dri-devel,
tzimmermann, andy, deller, gregkh
In-Reply-To: <20251230052827.4676-1-chintanlike@gmail.com>
On Mon, Dec 29, 2025 at 09:28:18PM -0800, Chintan Patel wrote:
> This series makes CONFIG_FB_DEVICE optional for fbdev drivers that use
> it only for sysfs interfaces, addressing Thomas Zimmermann’s TODO to
> remove hard FB_DEVICE dependencies.
>
> The series introduces a small helper, dev_of_fbinfo(), which returns
> NULL when CONFIG_FB_DEVICE=n. This allows sysfs code paths to be skipped
> via runtime checks, avoids #ifdef CONFIG_FB_DEVICE clutter, and keeps
> full compile-time syntax checking.
> Signed-off-by: Chintan Patel <chintanlike@gmail.com>
> ---
> Changes in v3:
> - Use PTR_IF() to conditionally include overlay_sysfs_group in
> overlay_sysfs_groups
> - Decouple variable definition and assignment in fbtft_sysfs_init/exit
Any particular reasons you ignored my tag from v2?
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply
* Re: [PATCH v3 0/4] fbdev: Make CONFIG_FB_DEVICE optional for drivers
From: Geert Uytterhoeven @ 2025-12-30 10:42 UTC (permalink / raw)
To: Chintan Patel
Cc: linux-fbdev, linux-staging, linux-omap, linux-kernel, dri-devel,
tzimmermann, andy, deller, gregkh
In-Reply-To: <20251230052827.4676-1-chintanlike@gmail.com>
Hi Chintan.
On Tue, 30 Dec 2025 at 06:29, Chintan Patel <chintanlike@gmail.com> wrote:
> This series makes CONFIG_FB_DEVICE optional for fbdev drivers that use
> it only for sysfs interfaces, addressing Thomas Zimmermann’s TODO to
> remove hard FB_DEVICE dependencies.
>
> The series introduces a small helper, dev_of_fbinfo(), which returns
> NULL when CONFIG_FB_DEVICE=n. This allows sysfs code paths to be skipped
> via runtime checks, avoids #ifdef CONFIG_FB_DEVICE clutter, and keeps
> full compile-time syntax checking.
>
> Signed-off-by: Chintan Patel <chintanlike@gmail.com>
> ---
> Changes in v3:
> - Use PTR_IF() to conditionally include overlay_sysfs_group in
> overlay_sysfs_groups
> - Decouple variable definition and assignment in fbtft_sysfs_init/exit
>
> Changes in v2:
> - Add dev_of_fbinfo() helper (suggested by Geert Uytterhoeven)
by Helge Deller, not me.
> - Replace #ifdef CONFIG_FB_DEVICE blocks with runtime NULL checks
> - Switch to fb_dbg() / fb_info() logging (suggested by Thomas Zimmermann)
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
^ permalink raw reply
* Re: [PATCH] fbdev: geode: lxfb: Use devm_request_mem_region
From: Helge Deller @ 2025-12-30 10:10 UTC (permalink / raw)
To: Swaraj Gaikwad, Andres Salomon,
moderated list:AMD GEODE PROCESSOR/CHIPSET SUPPORT,
open list:FRAMEBUFFER LAYER, open list:FRAMEBUFFER LAYER,
open list
Cc: skhan, david.hunter.linux
In-Reply-To: <20251214012059.304043-1-swarajgaikwad1925@gmail.com>
Hello Swaraj,
On 12/14/25 02:20, Swaraj Gaikwad wrote:
> The lxfb driver currently uses pci_request_region() for memory
> reservation, which requires manual error handling and cleanup using
> pci_release_region().
>
> Simplify the driver by migrating to the managed helper
> devm_request_mem_region(). This ensures that resources are automatically
> released on driver detach, allowing the removal of explicit cleanup code
> in the probe error path and the remove function.
>
> This addresses the TODO item "Request memory regions in all fbdev
> drivers" in Documentation/gpu/todo.rst.
>
> Signed-off-by: Swaraj Gaikwad <swarajgaikwad1925@gmail.com>
> ---
> Compile-tested only on x86_64.
I'm somewhat hesitated to apply your geode and arkfb patches.
IIRC, geode and arkfb chips were mostly (only?) used in some
laptops. That means, beside the arkfb and geode onboard graphics
chips there were no other (PCI) graphic cards which could conflict
at VGA addresses. So basically there is no real benefit for
those drivers to switching using devm_* functions.
Then, although your patches seem to be correct, it's hard to say
they are okay without actual testing.
That said, maybe someone still has the hardware and is able to test?
Helge
> drivers/video/fbdev/geode/lxfb_core.c | 36 +++++++++------------------
> 1 file changed, 12 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/video/fbdev/geode/lxfb_core.c b/drivers/video/fbdev/geode/lxfb_core.c
> index cad99f5b7fe8..8189d6a13c5d 100644
> --- a/drivers/video/fbdev/geode/lxfb_core.c
> +++ b/drivers/video/fbdev/geode/lxfb_core.c
> @@ -335,25 +335,21 @@ static int lxfb_map_video_memory(struct fb_info *info, struct pci_dev *dev)
> if (ret)
> return ret;
>
> - ret = pci_request_region(dev, 0, "lxfb-framebuffer");
> + if (!devm_request_mem_region(&dev->dev, pci_resource_start(dev, 0),
> + pci_resource_len(dev, 0), "lxfb-framebuffer"))
> + return -EBUSY;
>
> - if (ret)
> - return ret;
> -
> - ret = pci_request_region(dev, 1, "lxfb-gp");
> -
> - if (ret)
> - return ret;
> + if (!devm_request_mem_region(&dev->dev, pci_resource_start(dev, 1),
> + pci_resource_len(dev, 1), "lxfb-gp"))
> + return -EBUSY;
>
> - ret = pci_request_region(dev, 2, "lxfb-vg");
> + if (!devm_request_mem_region(&dev->dev, pci_resource_start(dev, 2),
> + pci_resource_len(dev, 2), "lxfb-vg"))
> + return -EBUSY;
>
> - if (ret)
> - return ret;
> -
> - ret = pci_request_region(dev, 3, "lxfb-vp");
> -
> - if (ret)
> - return ret;
> + if (!devm_request_mem_region(&dev->dev, pci_resource_start(dev, 3),
> + pci_resource_len(dev, 3), "lxfb-vp"))
> + return -EBUSY;
>
> info->fix.smem_start = pci_resource_start(dev, 0);
> info->fix.smem_len = vram ? vram : lx_framebuffer_size();
> @@ -546,19 +542,15 @@ static int lxfb_probe(struct pci_dev *pdev, const struct pci_device_id *id)
> err:
> if (info->screen_base) {
> iounmap(info->screen_base);
> - pci_release_region(pdev, 0);
> }
> if (par->gp_regs) {
> iounmap(par->gp_regs);
> - pci_release_region(pdev, 1);
> }
> if (par->dc_regs) {
> iounmap(par->dc_regs);
> - pci_release_region(pdev, 2);
> }
> if (par->vp_regs) {
> iounmap(par->vp_regs);
> - pci_release_region(pdev, 3);
> }
>
> fb_dealloc_cmap(&info->cmap);
> @@ -575,16 +567,12 @@ static void lxfb_remove(struct pci_dev *pdev)
> unregister_framebuffer(info);
>
> iounmap(info->screen_base);
> - pci_release_region(pdev, 0);
>
> iounmap(par->gp_regs);
> - pci_release_region(pdev, 1);
>
> iounmap(par->dc_regs);
> - pci_release_region(pdev, 2);
>
> iounmap(par->vp_regs);
> - pci_release_region(pdev, 3);
>
> fb_dealloc_cmap(&info->cmap);
> framebuffer_release(info);
>
> base-commit: a859eca0e4cc96f63ff125dbe5388d961558b0e9
> --
> 2.52.0
>
^ permalink raw reply
* Re: [PATCH] fbdev: xilinxfb: request memory region before mapping framebuffer
From: Helge Deller @ 2025-12-30 9:57 UTC (permalink / raw)
To: patdiviyam; +Cc: tzimmermann, linux-fbdev, dri-devel
In-Reply-To: <20251215225305.3820098-1-patdiviyam@gmail.com>
On 12/15/25 23:53, patdiviyam@gmail.com wrote:
> From: DiviyamPathak <patdiviyam@gmail.com>
>
> The xilinxfb driver maps a physical framebuffer address with ioremap()
> without first reserving the memory region. This can conflict with other
> drivers accessing the same resource.
>
> Request the memory region with devm_request_mem_region() before mapping
> the framebuffer and use managed mappings for proper lifetime handling.
>
> This addresses the fbdev TODO about requesting memory regions and avoids
> potential resource conflicts.
>
> Signed-off-by: DiviyamPathak <patdiviyam@gmail.com>
Was it tested it on physical hardware?
If not, could someone test?
Helge
> ---
> drivers/video/fbdev/xilinxfb.c | 30 +++++++++++++++++-------------
> 1 file changed, 17 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/video/fbdev/xilinxfb.c b/drivers/video/fbdev/xilinxfb.c
> index 0a6e05cd155a..f18437490de8 100644
> --- a/drivers/video/fbdev/xilinxfb.c
> +++ b/drivers/video/fbdev/xilinxfb.c
> @@ -280,19 +280,27 @@ static int xilinxfb_assign(struct platform_device *pdev,
> /* Allocate the framebuffer memory */
> if (pdata->fb_phys) {
> drvdata->fb_phys = pdata->fb_phys;
> - drvdata->fb_virt = ioremap(pdata->fb_phys, fbsize);
> + /* Request the memory region before mapping */
> + if (!devm_request_mem_region(dev, pdata->fb_phys, fbsize,
> + DRIVER_NAME)) {
> + dev_err(dev, "Cannot request framebuffer memory region\n");
> + return -EBUSY;
> + }
> + drvdata->fb_virt = devm_ioremap(dev, pdata->fb_phys, fbsize);
> + if (!drvdata->fb_virt) {
> + dev_err(dev, "Could not map framebuffer memory\n");
> + return -ENOMEM;
> + }
> } else {
> drvdata->fb_alloced = 1;
> drvdata->fb_virt = dma_alloc_coherent(dev, PAGE_ALIGN(fbsize),
> - &drvdata->fb_phys,
> - GFP_KERNEL);
> - }
> -
> - if (!drvdata->fb_virt) {
> - dev_err(dev, "Could not allocate frame buffer memory\n");
> - return -ENOMEM;
> + &drvdata->fb_phys,
> + GFP_KERNEL);
> + if (!drvdata->fb_virt) {
> + dev_err(dev, "Could not allocate frame buffer memory\n");
> + return -ENOMEM;
> + }
> }
> -
> /* Clear (turn to black) the framebuffer */
> memset_io((void __iomem *)drvdata->fb_virt, 0, fbsize);
>
> @@ -362,8 +370,6 @@ static int xilinxfb_assign(struct platform_device *pdev,
> if (drvdata->fb_alloced)
> dma_free_coherent(dev, PAGE_ALIGN(fbsize), drvdata->fb_virt,
> drvdata->fb_phys);
> - else
> - iounmap(drvdata->fb_virt);
>
> /* Turn off the display */
> xilinx_fb_out32(drvdata, REG_CTRL, 0);
> @@ -386,8 +392,6 @@ static void xilinxfb_release(struct device *dev)
> if (drvdata->fb_alloced)
> dma_free_coherent(dev, PAGE_ALIGN(drvdata->info.fix.smem_len),
> drvdata->fb_virt, drvdata->fb_phys);
> - else
> - iounmap(drvdata->fb_virt);
>
> /* Turn off the display */
> xilinx_fb_out32(drvdata, REG_CTRL, 0);
^ permalink raw reply
* Re: [PATCH] fbcon: Add check for return value
From: Helge Deller @ 2025-12-30 9:27 UTC (permalink / raw)
To: Ваторопин Андрей
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
In-Reply-To: <20251217091036.249549-1-a.vatoropin@crpt.ru>
On 12/17/25 10:11, ÐаÑоÑопин ÐндÑей wrote:
> From: Andrey Vatoropin <a.vatoropin@crpt.ru>
>
> If fbcon_open() fails when called from con2fb_acquire_newinfo() then
> info->fbcon_par pointer remains NULL which is later dereferenced.
>
> Add check for return value of the function con2fb_acquire_newinfo() to
> avoid it.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
I was unsure if I should apply this patch since we don't have a real problem.
This is inside the fbcon_init() function, so if con2fb_acquire_newinfo()
ever would have returned NULL, the kernel would have crashed and someone
would have reported it (or will report in the future if it happens).
Nevertheless, for correctness, I was tempted to change the check to a
WARN_ON() or BUG_ON() instead, but again: it never happened, so why
add bloat to the kernel ?
In the end, I've now applied this patch to the linux-fbdev git tree
as-is, just to avoid other people send similar patches based on
verification tool reports...
Thanks!
Helge
> Fixes: d1baa4ffa677 ("fbcon: set_con2fb_map fixes")
> Cc: stable@vger.kernel.org
> Signed-off-by: Andrey Vatoropin <a.vatoropin@crpt.ru>
> ---
> drivers/video/fbdev/core/fbcon.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c
> index e7e07eb2142e..7453377f3433 100644
> --- a/drivers/video/fbdev/core/fbcon.c
> +++ b/drivers/video/fbdev/core/fbcon.c
> @@ -1047,7 +1047,8 @@ static void fbcon_init(struct vc_data *vc, bool init)
> return;
>
> if (!info->fbcon_par)
> - con2fb_acquire_newinfo(vc, info, vc->vc_num);
> + if (con2fb_acquire_newinfo(vc, info, vc->vc_num))
> + return;
>
> /* If we are not the first console on this
> fb, copy the font from that console */
^ permalink raw reply
* Re: [PATCH 1/3] drivers: video: fbdev: Remove hyperv_fb driver
From: Helge Deller @ 2025-12-30 9:06 UTC (permalink / raw)
To: Prasanna Kumar T S M, linux-fbdev, dri-devel, linux-hyperv,
ssengar, mhklinux, wei.liu, kys, haiyangz, decui
Cc: linux-kernel
In-Reply-To: <1766809486-24731-1-git-send-email-ptsm@linux.microsoft.com>
On 12/27/25 05:24, Prasanna Kumar T S M wrote:
> The HyperV DRM driver is available since 5.14. This makes the hyperv_fb
> driver redundant, remove it.
>
> Signed-off-by: Prasanna Kumar T S M <ptsm@linux.microsoft.com>
> ---
> MAINTAINERS | 10 -
> drivers/video/fbdev/Kconfig | 11 -
> drivers/video/fbdev/Makefile | 1 -
> drivers/video/fbdev/hyperv_fb.c | 1388 -------------------------------
> 4 files changed, 1410 deletions(-)
> delete mode 100644 drivers/video/fbdev/hyperv_fb.c
applied to fbdev git tree.
Thanks!
Helge
^ permalink raw reply
* Re: [PATCH] fbdev: Use device_create_with_groups() to fix sysfs groups registration race
From: Helge Deller @ 2025-12-30 8:56 UTC (permalink / raw)
To: Hans de Goede, Simona Vetter
Cc: Thomas Zimmermann, dri-devel, linux-fbdev, stable, Shixiong Ou
In-Reply-To: <20251221165740.15821-1-johannes.goede@oss.qualcomm.com>
On 12/21/25 17:57, Hans de Goede wrote:
> The fbdev sysfs attributes are registered after sending the uevent for
> the device creation, leaving a race window where e.g. udev rules may
> not be able to access the sysfs attributes because the registration is
> not done yet.
>
> Fix this by switching to device_create_with_groups(). This also results in
> a nice cleanup. After switching to device_create_with_groups() all that
> is left of fb_init_device() is setting the drvdata and that can be passed
> to device_create[_with_groups]() too. After which fb_init_device() can
> be completely removed.
>
> Dropping fb_init_device() + fb_cleanup_device() in turn allows removing
> fb_info.class_flag as they were the only user of this field.
>
> Fixes: 5fc830d6aca1 ("fbdev: Register sysfs groups through device_add_group")
> Cc: stable@vger.kernel.org
> Cc: Shixiong Ou <oushixiong@kylinos.cn>
> Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
applied to fbdev git tree.
Thanks!
Helge
> ---
> Note the fixes tag is technically wrong. This race has existed forever.
> The commit I picked for the fixes tag is a dependency of this change not
> the commit introducing the race. I don't believe that backporting this
> back any further is useful which is why I went with this commit.
> ---
> drivers/video/fbdev/core/fbsysfs.c | 36 +++---------------------------
> include/linux/fb.h | 1 -
> 2 files changed, 3 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c
> index b8344c40073b..baa2bae0fb5b 100644
> --- a/drivers/video/fbdev/core/fbsysfs.c
> +++ b/drivers/video/fbdev/core/fbsysfs.c
> @@ -12,8 +12,6 @@
>
> #include "fb_internal.h"
>
> -#define FB_SYSFS_FLAG_ATTR 1
> -
> static int activate(struct fb_info *fb_info, struct fb_var_screeninfo *var)
> {
> int err;
> @@ -451,33 +449,7 @@ static struct attribute *fb_device_attrs[] = {
> NULL,
> };
>
> -static const struct attribute_group fb_device_attr_group = {
> - .attrs = fb_device_attrs,
> -};
> -
> -static int fb_init_device(struct fb_info *fb_info)
> -{
> - int ret;
> -
> - dev_set_drvdata(fb_info->dev, fb_info);
> -
> - fb_info->class_flag |= FB_SYSFS_FLAG_ATTR;
> -
> - ret = device_add_group(fb_info->dev, &fb_device_attr_group);
> - if (ret)
> - fb_info->class_flag &= ~FB_SYSFS_FLAG_ATTR;
> -
> - return 0;
> -}
> -
> -static void fb_cleanup_device(struct fb_info *fb_info)
> -{
> - if (fb_info->class_flag & FB_SYSFS_FLAG_ATTR) {
> - device_remove_group(fb_info->dev, &fb_device_attr_group);
> -
> - fb_info->class_flag &= ~FB_SYSFS_FLAG_ATTR;
> - }
> -}
> +ATTRIBUTE_GROUPS(fb_device);
>
> int fb_device_create(struct fb_info *fb_info)
> {
> @@ -485,14 +457,13 @@ int fb_device_create(struct fb_info *fb_info)
> dev_t devt = MKDEV(FB_MAJOR, node);
> int ret;
>
> - fb_info->dev = device_create(fb_class, fb_info->device, devt, NULL, "fb%d", node);
> + fb_info->dev = device_create_with_groups(fb_class, fb_info->device, devt, fb_info,
> + fb_device_groups, "fb%d", node);
> if (IS_ERR(fb_info->dev)) {
> /* Not fatal */
> ret = PTR_ERR(fb_info->dev);
> pr_warn("Unable to create device for framebuffer %d; error %d\n", node, ret);
> fb_info->dev = NULL;
> - } else {
> - fb_init_device(fb_info);
> }
>
> return 0;
> @@ -505,7 +476,6 @@ void fb_device_destroy(struct fb_info *fb_info)
> if (!fb_info->dev)
> return;
>
> - fb_cleanup_device(fb_info);
> device_destroy(fb_class, devt);
> fb_info->dev = NULL;
> }
> diff --git a/include/linux/fb.h b/include/linux/fb.h
> index 05cc251035da..c3302d513546 100644
> --- a/include/linux/fb.h
> +++ b/include/linux/fb.h
> @@ -497,7 +497,6 @@ struct fb_info {
> #if defined(CONFIG_FB_DEVICE)
> struct device *dev; /* This is this fb device */
> #endif
> - int class_flag; /* private sysfs flags */
> #ifdef CONFIG_FB_TILEBLITTING
> struct fb_tile_ops *tileops; /* Tile Blitting */
> #endif
^ permalink raw reply
* Re: [PATCH] fbdev: smscufx: properly copy ioctl memory to kernelspace
From: Helge Deller @ 2025-12-30 8:38 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-fbdev, dri-devel
Cc: linux-kernel, Tianchu Chen, stable, Steve Glendinning
In-Reply-To: <2025122802-radiance-vacancy-11da@gregkh>
On 12/28/25 14:17, Greg Kroah-Hartman wrote:
> The UFX_IOCTL_REPORT_DAMAGE ioctl does not properly copy data from
> userspace to kernelspace, and instead directly references the memory,
> which can cause problems if invalid data is passed from userspace. Fix
> this all up by correctly copying the memory before accessing it within
> the kernel.
>
> Reported-by: Tianchu Chen <flynnnchen@tencent.com>
> Cc: stable <stable@kernel.org>
> Cc: Steve Glendinning <steve.glendinning@shawell.net>
> Cc: Helge Deller <deller@gmx.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> drivers/video/fbdev/smscufx.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
applied to fbdev git tree.
Thanks!
Helge
^ permalink raw reply
* Re: [PATCH v2 14/19] video/vga: Add VGA_IS0_R
From: Helge Deller @ 2025-12-30 8:30 UTC (permalink / raw)
To: Ville Syrjälä, Jani Nikula; +Cc: linux-fbdev, dri-devel
In-Reply-To: <aUQyVvduElkoz-hU@intel.com>
On 12/18/25 17:56, Ville Syrjälä wrote:
> On Tue, Dec 09, 2025 at 12:55:49PM +0200, Jani Nikula wrote:
>> On Tue, 09 Dec 2025, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
>>> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>>
>>> Add a proper name for the "Input status register 0" IO address.
>>> Currently we have some code that does read addressed using the
>>> aliasing VGA_MSR_W define, making it unclear what register we're
>>> actually reading.
>>>
>>> v2: Remove stray '?'
>>>
>>> Cc: Helge Deller <deller@gmx.de>
>
> Helge, can you toss me an ack to merge this via drm-intel please?
of course!
Acked-by: Helge Deller <deller@gmx.de>
>>> Cc: linux-fbdev@vger.kernel.org
>>> Cc: dri-devel@lists.freedesktop.org
>>> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
>>
>> Reviewed-by: Jani Nikula <jani.nikula@intel.com>
>>
>>> ---
>>> include/video/vga.h | 1 +
>>> 1 file changed, 1 insertion(+)
>>>
>>> diff --git a/include/video/vga.h b/include/video/vga.h
>>> index 468764d6727a..2f13c371800b 100644
>>> --- a/include/video/vga.h
>>> +++ b/include/video/vga.h
>>> @@ -46,6 +46,7 @@
>>> #define VGA_MIS_R 0x3CC /* Misc Output Read Register */
>>> #define VGA_MIS_W 0x3C2 /* Misc Output Write Register */
>>> #define VGA_FTC_R 0x3CA /* Feature Control Read Register */
>>> +#define VGA_IS0_R 0x3C2 /* Input Status Register 0 */
>>> #define VGA_IS1_RC 0x3DA /* Input Status Register 1 - color emulation */
>>> #define VGA_IS1_RM 0x3BA /* Input Status Register 1 - mono emulation */
>>> #define VGA_PEL_D 0x3C9 /* PEL Data Register */
>>
>> --
>> Jani Nikula, Intel
>
^ permalink raw reply
* Re: [PATCH v3 4/4] fbdev: sh_mobile_lcdc: Make FB_DEVICE dependency optional
From: Helge Deller @ 2025-12-30 8:13 UTC (permalink / raw)
To: Chintan Patel; +Cc: linux-fbdev, linux-omap, linux-kernel, dri-devel
In-Reply-To: <20251230052827.4676-5-chintanlike@gmail.com>
* Chintan Patel <chintanlike@gmail.com>:
> The sh_mobile_lcdc driver exposes overlay configuration via sysfs, but the
> core driver does not require CONFIG_FB_DEVICE.
>
> Make sysfs support optional by defining overlay_sysfs_groups conditionally
> using PTR_IF(). The driver always sets .dev_groups, and the kernel
> naturally skips NULL attribute groups while the code remains buildable
> and type-checked.
>
> Suggested-by: Helge Deller <deller@gmx.de>
> Signed-off-by: Chintan Patel <chintanlike@gmail.com>
> ---
> drivers/video/fbdev/sh_mobile_lcdcfb.c | 12 +++++++++++-
> 1 file changed, 11 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
> index dd950e4ab5ce..cb7ed1ff9165 100644
> --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c
> +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c
> @@ -1350,7 +1350,17 @@ static struct attribute *overlay_sysfs_attrs[] = {
> &dev_attr_overlay_rop3.attr,
> NULL,
> };
> -ATTRIBUTE_GROUPS(overlay_sysfs);
Instead of replacing the ^ ATTRIBUTE_GROUPS() by the code below,
isn't it possible to just mark the overlay_sysfs_attrs[] array
_maybe_unused, and just do:
+ #ifdef CONFIG_FB_DEVICE
+ ATTRIBUTE_GROUPS(overlay_sysfs);
+ #endif
?
Helge
> +
> +#ifdef CONFIG_FB_DEVICE
> +static const struct attribute_group overlay_sysfs_group = {
> + .attrs = overlay_sysfs_attrs,
> +};
> +#endif
> +
> +static const struct attribute_group *overlay_sysfs_groups[] = {
> + PTR_IF(IS_ENABLED(CONFIG_FB_DEVICE), &overlay_sysfs_group),
> + NULL,
> +};
>
> static const struct fb_fix_screeninfo sh_mobile_lcdc_overlay_fix = {
> .id = "SH Mobile LCDC",
> --
> 2.43.0
>
>
^ permalink raw reply
* Re: [PATCH v3 3/4] fbdev: omapfb: Make FB_DEVICE dependency optional
From: Helge Deller @ 2025-12-30 8:05 UTC (permalink / raw)
To: Chintan Patel; +Cc: linux-fbdev, linux-omap, linux-kernel, dri-devel
In-Reply-To: <20251230052827.4676-4-chintanlike@gmail.com>
* Chintan Patel <chintanlike@gmail.com>:
> omapfb provides several sysfs interfaces for framebuffer configuration
> and debugging, but these are not required for the core driver.
>
> Remove the hard dependency on CONFIG_FB_DEVICE and make sysfs support
> optional by using dev_of_fbinfo() to obtain the backing device at runtime.
> When FB_DEVICE is disabled, sysfs operations are skipped while the code
> still builds and is type-checked.
>
> Suggested-by: Helge Deller <deller@gmx.de>
> Signed-off-by: Chintan Patel <chintanlike@gmail.com>
Reviewed-by: Helge Deller <deller@gmx.de>
> ---
> drivers/video/fbdev/omap2/omapfb/Kconfig | 3 ++-
> drivers/video/fbdev/omap2/omapfb/omapfb-sysfs.c | 16 ++++++++++++----
> 2 files changed, 14 insertions(+), 5 deletions(-)
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox