* [PATCH 1/3] dummycon: only build module if there are users
@ 2025-02-25 16:44 Arnd Bergmann
2025-02-25 16:44 ` [PATCH 2/3] dummycon: fix default rows/cols Arnd Bergmann
` (3 more replies)
0 siblings, 4 replies; 15+ messages in thread
From: Arnd Bergmann @ 2025-02-25 16:44 UTC (permalink / raw)
To: Greg Kroah-Hartman, Helge Deller
Cc: Arnd Bergmann, linux-fbdev, dri-devel, linux-kernel
From: Arnd Bergmann <arnd@arndb.de>
Dummycon is used as a fallback conswitchp for vgacon and fbcon
in the VT code, and there are no references to it if all three
are disabled, so just leave it out of the kernel image for
configurations without those.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/video/console/Kconfig | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index bc31db6ef7d2..1c4263c164ce 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -47,8 +47,7 @@ config SGI_NEWPORT_CONSOLE
card of your Indy. Most people say Y here.
config DUMMY_CONSOLE
- bool
- default y
+ def_bool VT || VGA_CONSOLE || FRAMEBUFFER_CONSOLE
config DUMMY_CONSOLE_COLUMNS
int "Initial number of console screen columns"
--
2.39.5
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH 2/3] dummycon: fix default rows/cols 2025-02-25 16:44 [PATCH 1/3] dummycon: only build module if there are users Arnd Bergmann @ 2025-02-25 16:44 ` Arnd Bergmann 2025-02-26 7:54 ` Thomas Zimmermann 2025-02-25 16:44 ` [PATCH 3/3] mdacon: rework dependency list Arnd Bergmann ` (2 subsequent siblings) 3 siblings, 1 reply; 15+ messages in thread From: Arnd Bergmann @ 2025-02-25 16:44 UTC (permalink / raw) To: Greg Kroah-Hartman, Helge Deller, Thomas Zimmermann, Arnd Bergmann, Javier Martinez Canillas Cc: kernel test robot, linux-fbdev, dri-devel, linux-kernel From: Arnd Bergmann <arnd@arndb.de> dummycon fails to build on ARM/footbridge when the VGA console is disabled, since I got the dependencies slightly wrong in a previous patch: drivers/video/console/dummycon.c: In function 'dummycon_init': drivers/video/console/dummycon.c:27:25: error: 'CONFIG_DUMMY_CONSOLE_COLUMNS' undeclared (first use in this function); did you mean 'CONFIG_DUMMY_CONSOLE'? 27 | #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS drivers/video/console/dummycon.c:28:25: error: 'CONFIG_DUMMY_CONSOLE_ROWS' undeclared (first use in this function); did you mean 'CONFIG_DUMMY_CONSOLE'? 28 | #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS This only showed up after many thousand randconfig builds on Arm, and doesn't matter in practice, but should still be fixed. Address it by using the default row/columns on footbridge after all in that corner case. Fixes: 4293b0925149 ("dummycon: limit Arm console size hack to footbridge") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202409151512.LML1slol-lkp@intel.com/ Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- drivers/video/console/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index 1c4263c164ce..ea4863919eb9 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -51,7 +51,7 @@ config DUMMY_CONSOLE config DUMMY_CONSOLE_COLUMNS int "Initial number of console screen columns" - depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE + depends on DUMMY_CONSOLE && !(ARCH_FOOTBRIDGE && VGA_CONSOLE) default 160 if PARISC default 80 help @@ -61,7 +61,7 @@ config DUMMY_CONSOLE_COLUMNS config DUMMY_CONSOLE_ROWS int "Initial number of console screen rows" - depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE + depends on DUMMY_CONSOLE && !(ARCH_FOOTBRIDGE && VGA_CONSOLE) default 64 if PARISC default 30 if ARM default 25 -- 2.39.5 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 2/3] dummycon: fix default rows/cols 2025-02-25 16:44 ` [PATCH 2/3] dummycon: fix default rows/cols Arnd Bergmann @ 2025-02-26 7:54 ` Thomas Zimmermann 0 siblings, 0 replies; 15+ messages in thread From: Thomas Zimmermann @ 2025-02-26 7:54 UTC (permalink / raw) To: Arnd Bergmann, Greg Kroah-Hartman, Helge Deller, Arnd Bergmann, Javier Martinez Canillas Cc: kernel test robot, linux-fbdev, dri-devel, linux-kernel Am 25.02.25 um 17:44 schrieb Arnd Bergmann: > From: Arnd Bergmann <arnd@arndb.de> > > dummycon fails to build on ARM/footbridge when the VGA console is > disabled, since I got the dependencies slightly wrong in a previous > patch: > > drivers/video/console/dummycon.c: In function 'dummycon_init': > drivers/video/console/dummycon.c:27:25: error: 'CONFIG_DUMMY_CONSOLE_COLUMNS' undeclared (first use in this function); did you mean 'CONFIG_DUMMY_CONSOLE'? > 27 | #define DUMMY_COLUMNS CONFIG_DUMMY_CONSOLE_COLUMNS > drivers/video/console/dummycon.c:28:25: error: 'CONFIG_DUMMY_CONSOLE_ROWS' undeclared (first use in this function); did you mean 'CONFIG_DUMMY_CONSOLE'? > 28 | #define DUMMY_ROWS CONFIG_DUMMY_CONSOLE_ROWS > > This only showed up after many thousand randconfig builds on Arm, and > doesn't matter in practice, but should still be fixed. Address it by > using the default row/columns on footbridge after all in that corner > case. > > Fixes: 4293b0925149 ("dummycon: limit Arm console size hack to footbridge") > Reported-by: kernel test robot <lkp@intel.com> > Closes: https://lore.kernel.org/oe-kbuild-all/202409151512.LML1slol-lkp@intel.com/ > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> > --- > drivers/video/console/Kconfig | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig > index 1c4263c164ce..ea4863919eb9 100644 > --- a/drivers/video/console/Kconfig > +++ b/drivers/video/console/Kconfig > @@ -51,7 +51,7 @@ config DUMMY_CONSOLE > > config DUMMY_CONSOLE_COLUMNS > int "Initial number of console screen columns" > - depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE > + depends on DUMMY_CONSOLE && !(ARCH_FOOTBRIDGE && VGA_CONSOLE) > default 160 if PARISC > default 80 > help > @@ -61,7 +61,7 @@ config DUMMY_CONSOLE_COLUMNS > > config DUMMY_CONSOLE_ROWS > int "Initial number of console screen rows" > - depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE > + depends on DUMMY_CONSOLE && !(ARCH_FOOTBRIDGE && VGA_CONSOLE) > default 64 if PARISC > default 30 if ARM > default 25 -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 3/3] mdacon: rework dependency list 2025-02-25 16:44 [PATCH 1/3] dummycon: only build module if there are users Arnd Bergmann 2025-02-25 16:44 ` [PATCH 2/3] dummycon: fix default rows/cols Arnd Bergmann @ 2025-02-25 16:44 ` Arnd Bergmann 2025-02-26 8:08 ` Thomas Zimmermann 2025-02-26 7:48 ` [PATCH 1/3] dummycon: only build module if there are users Thomas Zimmermann 2025-03-09 1:46 ` Helge Deller 3 siblings, 1 reply; 15+ messages in thread From: Arnd Bergmann @ 2025-02-25 16:44 UTC (permalink / raw) To: Greg Kroah-Hartman, Helge Deller, Roland Kletzing, Andrew Morton Cc: Arnd Bergmann, linux-fbdev, dri-devel, linux-kernel From: Arnd Bergmann <arnd@arndb.de> mdacon has roughly the same dependencies as vgacon but expresses them as a negative list instead of a positive list, with the only practical difference being PowerPC/CHRP, which uses vga16fb instead of vgacon. The CONFIG_MDA_CONSOLE description advises to only turn it on when vgacon is also used because MDA/Hercules-only systems should be using vgacon instead, so just change the list to enforce that directly for simplicity. The probing was broken from 2002 to 2008, this improves on the fix that was added then: If vgacon is a loadable module, then mdacon cannot be built-in now, and the list of systems that support vgacon is carried over. Fixes: 0b9cf3aa6b1e ("mdacon messing up default vc's - set default to vc13-16 again") Signed-off-by: Arnd Bergmann <arnd@arndb.de> --- I have no idea when the last time was that someone actually tried using dualhead vgacon/mdacon with two ISA cards, or if it still works. We may be better off removing the driver altogether, but I don't see anything immediately wrong it with it. --- drivers/video/console/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig index ea4863919eb9..12f54480f57f 100644 --- a/drivers/video/console/Kconfig +++ b/drivers/video/console/Kconfig @@ -24,7 +24,7 @@ config VGA_CONSOLE Say Y. config MDA_CONSOLE - depends on !M68K && !PARISC && ISA + depends on VGA_CONSOLE && ISA tristate "MDA text console (dual-headed)" help Say Y here if you have an old MDA or monochrome Hercules graphics -- 2.39.5 ^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 3/3] mdacon: rework dependency list 2025-02-25 16:44 ` [PATCH 3/3] mdacon: rework dependency list Arnd Bergmann @ 2025-02-26 8:08 ` Thomas Zimmermann 0 siblings, 0 replies; 15+ messages in thread From: Thomas Zimmermann @ 2025-02-26 8:08 UTC (permalink / raw) To: Arnd Bergmann, Greg Kroah-Hartman, Helge Deller, Roland Kletzing, Andrew Morton Cc: Arnd Bergmann, linux-fbdev, dri-devel, linux-kernel Am 25.02.25 um 17:44 schrieb Arnd Bergmann: > From: Arnd Bergmann <arnd@arndb.de> > > mdacon has roughly the same dependencies as vgacon but expresses them > as a negative list instead of a positive list, with the only practical > difference being PowerPC/CHRP, which uses vga16fb instead of vgacon. > > The CONFIG_MDA_CONSOLE description advises to only turn it on when vgacon > is also used because MDA/Hercules-only systems should be using vgacon > instead, so just change the list to enforce that directly for simplicity. > > The probing was broken from 2002 to 2008, this improves on the fix > that was added then: If vgacon is a loadable module, then mdacon > cannot be built-in now, and the list of systems that support vgacon > is carried over. > > Fixes: 0b9cf3aa6b1e ("mdacon messing up default vc's - set default to vc13-16 again") > Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> > --- > I have no idea when the last time was that someone actually tried using > dualhead vgacon/mdacon with two ISA cards, or if it still works. We may > be better off removing the driver altogether, but I don't see anything > immediately wrong it with it. > --- > drivers/video/console/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig > index ea4863919eb9..12f54480f57f 100644 > --- a/drivers/video/console/Kconfig > +++ b/drivers/video/console/Kconfig > @@ -24,7 +24,7 @@ config VGA_CONSOLE > Say Y. > > config MDA_CONSOLE > - depends on !M68K && !PARISC && ISA > + depends on VGA_CONSOLE && ISA > tristate "MDA text console (dual-headed)" > help > Say Y here if you have an old MDA or monochrome Hercules graphics -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-25 16:44 [PATCH 1/3] dummycon: only build module if there are users Arnd Bergmann 2025-02-25 16:44 ` [PATCH 2/3] dummycon: fix default rows/cols Arnd Bergmann 2025-02-25 16:44 ` [PATCH 3/3] mdacon: rework dependency list Arnd Bergmann @ 2025-02-26 7:48 ` Thomas Zimmermann 2025-02-26 7:53 ` Thomas Zimmermann 2025-02-26 7:55 ` Arnd Bergmann 2025-03-09 1:46 ` Helge Deller 3 siblings, 2 replies; 15+ messages in thread From: Thomas Zimmermann @ 2025-02-26 7:48 UTC (permalink / raw) To: Arnd Bergmann, Greg Kroah-Hartman, Helge Deller Cc: Arnd Bergmann, linux-fbdev, dri-devel, linux-kernel Hi Arnd Am 25.02.25 um 17:44 schrieb Arnd Bergmann: > From: Arnd Bergmann <arnd@arndb.de> > > Dummycon is used as a fallback conswitchp for vgacon and fbcon > in the VT code, and there are no references to it if all three > are disabled, so just leave it out of the kernel image for > configurations without those. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/video/console/Kconfig | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig > index bc31db6ef7d2..1c4263c164ce 100644 > --- a/drivers/video/console/Kconfig > +++ b/drivers/video/console/Kconfig > @@ -47,8 +47,7 @@ config SGI_NEWPORT_CONSOLE > card of your Indy. Most people say Y here. > > config DUMMY_CONSOLE > - bool > - default y > + def_bool VT || VGA_CONSOLE || FRAMEBUFFER_CONSOLE What about MDA_CONSOLE and STI_CONSOLE. Don't they require this as fallback? Best regards Thomas > > config DUMMY_CONSOLE_COLUMNS > int "Initial number of console screen columns" -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-26 7:48 ` [PATCH 1/3] dummycon: only build module if there are users Thomas Zimmermann @ 2025-02-26 7:53 ` Thomas Zimmermann 2025-02-26 7:55 ` Arnd Bergmann 1 sibling, 0 replies; 15+ messages in thread From: Thomas Zimmermann @ 2025-02-26 7:53 UTC (permalink / raw) To: Arnd Bergmann, Greg Kroah-Hartman, Helge Deller Cc: Arnd Bergmann, linux-fbdev, dri-devel, linux-kernel Am 26.02.25 um 08:48 schrieb Thomas Zimmermann: > Hi Arnd > > Am 25.02.25 um 17:44 schrieb Arnd Bergmann: >> From: Arnd Bergmann <arnd@arndb.de> >> >> Dummycon is used as a fallback conswitchp for vgacon and fbcon >> in the VT code, and there are no references to it if all three >> are disabled, so just leave it out of the kernel image for >> configurations without those. >> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> >> --- >> drivers/video/console/Kconfig | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/drivers/video/console/Kconfig >> b/drivers/video/console/Kconfig >> index bc31db6ef7d2..1c4263c164ce 100644 >> --- a/drivers/video/console/Kconfig >> +++ b/drivers/video/console/Kconfig >> @@ -47,8 +47,7 @@ config SGI_NEWPORT_CONSOLE >> card of your Indy. Most people say Y here. >> config DUMMY_CONSOLE >> - bool >> - default y >> + def_bool VT || VGA_CONSOLE || FRAMEBUFFER_CONSOLE > > What about MDA_CONSOLE and STI_CONSOLE. Don't they require this as > fallback? I did some grepping in the kernel sources and found the answer to this question. It's still surprising that the other consoles don't use dummycon. They are never unloaded, it seems. Best regards Thomas > > Best regards > Thomas > >> config DUMMY_CONSOLE_COLUMNS >> int "Initial number of console screen columns" > -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-26 7:48 ` [PATCH 1/3] dummycon: only build module if there are users Thomas Zimmermann 2025-02-26 7:53 ` Thomas Zimmermann @ 2025-02-26 7:55 ` Arnd Bergmann 2025-02-26 8:16 ` Thomas Zimmermann 1 sibling, 1 reply; 15+ messages in thread From: Arnd Bergmann @ 2025-02-26 7:55 UTC (permalink / raw) To: Thomas Zimmermann, Arnd Bergmann, Greg Kroah-Hartman, Helge Deller Cc: linux-fbdev, dri-devel, linux-kernel On Wed, Feb 26, 2025, at 08:48, Thomas Zimmermann wrote: > Am 25.02.25 um 17:44 schrieb Arnd Bergmann: >> From: Arnd Bergmann <arnd@arndb.de> >> >> Dummycon is used as a fallback conswitchp for vgacon and fbcon >> in the VT code, and there are no references to it if all three >> are disabled, so just leave it out of the kernel image for >> configurations without those. >> >> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >> --- >> drivers/video/console/Kconfig | 3 +-- >> 1 file changed, 1 insertion(+), 2 deletions(-) >> >> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig >> index bc31db6ef7d2..1c4263c164ce 100644 >> --- a/drivers/video/console/Kconfig >> +++ b/drivers/video/console/Kconfig >> @@ -47,8 +47,7 @@ config SGI_NEWPORT_CONSOLE >> card of your Indy. Most people say Y here. >> >> config DUMMY_CONSOLE >> - bool >> - default y >> + def_bool VT || VGA_CONSOLE || FRAMEBUFFER_CONSOLE > > What about MDA_CONSOLE and STI_CONSOLE. Don't they require this as fallback? > MDA_CONSOLE clearly does not, because that is only the second console when VGA_CONSOLE is the main one. For sti_console, I don't see how it would do use it: when CONFIG_VT is enabled, the line above turns on DUMMY_CONSOLE, but without CONFIG_VT there seems to be no reference to it after 58a5c67aadde ("parisc/sticon: Always register sticon console driver"). I also see that CONFIG_STI_CONSOLE is a 'bool' symbol, so there is no dynamic loading/unloading of the driver. Arnd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-26 7:55 ` Arnd Bergmann @ 2025-02-26 8:16 ` Thomas Zimmermann 2025-02-26 11:46 ` Arnd Bergmann 0 siblings, 1 reply; 15+ messages in thread From: Thomas Zimmermann @ 2025-02-26 8:16 UTC (permalink / raw) To: Arnd Bergmann, Arnd Bergmann, Greg Kroah-Hartman, Helge Deller Cc: linux-fbdev, dri-devel, linux-kernel Hi Am 26.02.25 um 08:55 schrieb Arnd Bergmann: > On Wed, Feb 26, 2025, at 08:48, Thomas Zimmermann wrote: >> Am 25.02.25 um 17:44 schrieb Arnd Bergmann: >>> From: Arnd Bergmann <arnd@arndb.de> >>> >>> Dummycon is used as a fallback conswitchp for vgacon and fbcon >>> in the VT code, and there are no references to it if all three >>> are disabled, so just leave it out of the kernel image for >>> configurations without those. >>> >>> Signed-off-by: Arnd Bergmann <arnd@arndb.de> >>> --- >>> drivers/video/console/Kconfig | 3 +-- >>> 1 file changed, 1 insertion(+), 2 deletions(-) >>> >>> diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig >>> index bc31db6ef7d2..1c4263c164ce 100644 >>> --- a/drivers/video/console/Kconfig >>> +++ b/drivers/video/console/Kconfig >>> @@ -47,8 +47,7 @@ config SGI_NEWPORT_CONSOLE >>> card of your Indy. Most people say Y here. >>> >>> config DUMMY_CONSOLE >>> - bool >>> - default y >>> + def_bool VT || VGA_CONSOLE || FRAMEBUFFER_CONSOLE >> What about MDA_CONSOLE and STI_CONSOLE. Don't they require this as fallback? >> > MDA_CONSOLE clearly does not, because that is only the second > console when VGA_CONSOLE is the main one. > > For sti_console, I don't see how it would do use it: when CONFIG_VT > is enabled, the line above turns on DUMMY_CONSOLE, but without > CONFIG_VT there seems to be no reference to it after > 58a5c67aadde ("parisc/sticon: Always register sticon console > driver"). I also see that CONFIG_STI_CONSOLE is a 'bool' symbol, > so there is no dynamic loading/unloading of the driver. Thanks. Here's another general question. vgacon and fbcon only seem usable with CONFIG_VT=y. Wouldn't it make sense to have them depend on CONFIG_VT=y? dummycon could then be implemented as part of the vt code, maybe even become a vt-internal thing. The console code is complex, so I'm probably missing something here? Best regards Thomas > > Arnd -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-26 8:16 ` Thomas Zimmermann @ 2025-02-26 11:46 ` Arnd Bergmann 2025-02-26 12:05 ` Javier Martinez Canillas ` (2 more replies) 0 siblings, 3 replies; 15+ messages in thread From: Arnd Bergmann @ 2025-02-26 11:46 UTC (permalink / raw) To: Thomas Zimmermann, Arnd Bergmann, Greg Kroah-Hartman, Helge Deller Cc: linux-fbdev, dri-devel, linux-kernel On Wed, Feb 26, 2025, at 09:16, Thomas Zimmermann wrote: > Am 26.02.25 um 08:55 schrieb Arnd Bergmann: > Here's another general question. vgacon and fbcon only seem usable with > CONFIG_VT=y. Wouldn't it make sense to have them depend on CONFIG_VT=y? > dummycon could then be implemented as part of the vt code, maybe even > become a vt-internal thing. The console code is complex, so I'm probably > missing something here? I think in theory one may have a system use fbcon purely to get the boot logo, but not actually support VT. I had also assumed there might be a way to use fbcon as the console (i.e. printk) but not register the tty, but it looks like the console code still requires vt. After I looked at the vt and conswitchp code some more, I wonder if we could go the other way and instead of integrating it more make the conswitchp logic optional: most of the complexity here deals with switching between text console and fbcon dynamically, but having any text console support is getting very rare (vga on alpha/mips/x86-32, newport on mips-ip22, sti on parisc). If we do this, the conswitchp code could be merged with dummycon in drivers/video/console, with the simpler alternative just calling into fbcon functions. I'm not sure if we can already drop vgacon from normal x86-64 distro configs, i.e. if there are cases that are not already covered by any of efi-earlycon, efifb, vga16fb, vesafb/uvesafb or a PCI DRM driver. Arnd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-26 11:46 ` Arnd Bergmann @ 2025-02-26 12:05 ` Javier Martinez Canillas 2025-02-26 13:18 ` Arnd Bergmann 2025-02-26 16:35 ` Helge Deller 2025-02-27 9:25 ` Thomas Zimmermann 2 siblings, 1 reply; 15+ messages in thread From: Javier Martinez Canillas @ 2025-02-26 12:05 UTC (permalink / raw) To: Arnd Bergmann, Thomas Zimmermann, Arnd Bergmann, Greg Kroah-Hartman, Helge Deller Cc: linux-fbdev, dri-devel, linux-kernel "Arnd Bergmann" <arnd@arndb.de> writes: Hello Arnd, > On Wed, Feb 26, 2025, at 09:16, Thomas Zimmermann wrote: >> Am 26.02.25 um 08:55 schrieb Arnd Bergmann: >> Here's another general question. vgacon and fbcon only seem usable with >> CONFIG_VT=y. Wouldn't it make sense to have them depend on CONFIG_VT=y? >> dummycon could then be implemented as part of the vt code, maybe even >> become a vt-internal thing. The console code is complex, so I'm probably >> missing something here? > > I think in theory one may have a system use fbcon purely to get the > boot logo, but not actually support VT. I had also assumed there might > be a way to use fbcon as the console (i.e. printk) but not register > the tty, but it looks like the console code still requires vt. > > After I looked at the vt and conswitchp code some more, I wonder > if we could go the other way and instead of integrating it more > make the conswitchp logic optional: most of the complexity here > deals with switching between text console and fbcon dynamically, > but having any text console support is getting very rare (vga > on alpha/mips/x86-32, newport on mips-ip22, sti on parisc). > > If we do this, the conswitchp code could be merged with dummycon This sounds like a much better approach indeed. > in drivers/video/console, with the simpler alternative just > calling into fbcon functions. I'm not sure if we can already drop > vgacon from normal x86-64 distro configs, i.e. if there are cases > that are not already covered by any of efi-earlycon, efifb, > vga16fb, vesafb/uvesafb or a PCI DRM driver. > I believe vgacon is still useful for x86 with legacy BIOS, because vesafb (and simpledrm) only works if the user defines a mode using the vga= kernel cmdline parameter. > Arnd > -- Best regards, Javier Martinez Canillas Core Platforms Red Hat ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-26 12:05 ` Javier Martinez Canillas @ 2025-02-26 13:18 ` Arnd Bergmann 0 siblings, 0 replies; 15+ messages in thread From: Arnd Bergmann @ 2025-02-26 13:18 UTC (permalink / raw) To: Javier Martinez Canillas, Thomas Zimmermann, Arnd Bergmann, Greg Kroah-Hartman, Helge Deller Cc: linux-fbdev, dri-devel, linux-kernel On Wed, Feb 26, 2025, at 13:05, Javier Martinez Canillas wrote: > "Arnd Bergmann" <arnd@arndb.de> writes: >> in drivers/video/console, with the simpler alternative just >> calling into fbcon functions. I'm not sure if we can already drop >> vgacon from normal x86-64 distro configs, i.e. if there are cases >> that are not already covered by any of efi-earlycon, efifb, >> vga16fb, vesafb/uvesafb or a PCI DRM driver. >> > > I believe vgacon is still useful for x86 with legacy BIOS, because > vesafb (and simpledrm) only works if the user defines a mode using > the vga= kernel cmdline parameter. Right, at the minimum, a configuration without vgacon would have to pick a graphical mode in arch/x86/boot/video*.c if one wasn't already set by grub. Looking through the git history of that code, it seems that there are lots of corner cases with weird 32-bit hardware. Anything from the past 20 years is probably reasonably safe, but there still needs to be a way to configure vgacon back in to be safe. Arnd ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-26 11:46 ` Arnd Bergmann 2025-02-26 12:05 ` Javier Martinez Canillas @ 2025-02-26 16:35 ` Helge Deller 2025-02-27 9:25 ` Thomas Zimmermann 2 siblings, 0 replies; 15+ messages in thread From: Helge Deller @ 2025-02-26 16:35 UTC (permalink / raw) To: Arnd Bergmann, Thomas Zimmermann, Arnd Bergmann, Greg Kroah-Hartman Cc: linux-fbdev, dri-devel, linux-kernel On 2/26/25 12:46, Arnd Bergmann wrote: > On Wed, Feb 26, 2025, at 09:16, Thomas Zimmermann wrote: >> Am 26.02.25 um 08:55 schrieb Arnd Bergmann: >> Here's another general question. vgacon and fbcon only seem usable with >> CONFIG_VT=y. Wouldn't it make sense to have them depend on CONFIG_VT=y? >> dummycon could then be implemented as part of the vt code, maybe even >> become a vt-internal thing. The console code is complex, so I'm probably >> missing something here? > > I think in theory one may have a system use fbcon purely to get the > boot logo, but not actually support VT. I had also assumed there might > be a way to use fbcon as the console (i.e. printk) but not register > the tty, but it looks like the console code still requires vt. > > After I looked at the vt and conswitchp code some more, I wonder > if we could go the other way and instead of integrating it more > make the conswitchp logic optional: most of the complexity here > deals with switching between text console and fbcon dynamically, > but having any text console support is getting very rare (vga > on alpha/mips/x86-32, newport on mips-ip22, sti on parisc). Yes, it's rare. But on parisc, if no supported fbdev or drm graphic card is found, it needs to stays on sticon (which always works). Otherwise - if a card was found - the kernel switches dynamically to fbcon. > If we do this, the conswitchp code could be merged with dummycon > in drivers/video/console, with the simpler alternative just > calling into fbcon functions. As mentioned above, that should be optional then. > I'm not sure if we can already drop > vgacon from normal x86-64 distro configs, i.e. if there are cases > that are not already covered by any of efi-earlycon, efifb, > vga16fb, vesafb/uvesafb or a PCI DRM driver. Helge ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-26 11:46 ` Arnd Bergmann 2025-02-26 12:05 ` Javier Martinez Canillas 2025-02-26 16:35 ` Helge Deller @ 2025-02-27 9:25 ` Thomas Zimmermann 2 siblings, 0 replies; 15+ messages in thread From: Thomas Zimmermann @ 2025-02-27 9:25 UTC (permalink / raw) To: Arnd Bergmann, Arnd Bergmann, Greg Kroah-Hartman, Helge Deller Cc: linux-fbdev, dri-devel, linux-kernel Hi Am 26.02.25 um 12:46 schrieb Arnd Bergmann: > On Wed, Feb 26, 2025, at 09:16, Thomas Zimmermann wrote: >> Am 26.02.25 um 08:55 schrieb Arnd Bergmann: >> Here's another general question. vgacon and fbcon only seem usable with >> CONFIG_VT=y. Wouldn't it make sense to have them depend on CONFIG_VT=y? >> dummycon could then be implemented as part of the vt code, maybe even >> become a vt-internal thing. The console code is complex, so I'm probably >> missing something here? > I think in theory one may have a system use fbcon purely to get the > boot logo, but not actually support VT. I had also assumed there might > be a way to use fbcon as the console (i.e. printk) but not register > the tty, but it looks like the console code still requires vt. > > After I looked at the vt and conswitchp code some more, I wonder > if we could go the other way and instead of integrating it more > make the conswitchp logic optional: most of the complexity here > deals with switching between text console and fbcon dynamically, > but having any text console support is getting very rare (vga > on alpha/mips/x86-32, newport on mips-ip22, sti on parisc). > > If we do this, the conswitchp code could be merged with dummycon > in drivers/video/console, with the simpler alternative just > calling into fbcon functions. I'm not sure if we can already drop > vgacon from normal x86-64 distro configs, i.e. if there are cases > that are not already covered by any of efi-earlycon, efifb, > vga16fb, vesafb/uvesafb or a PCI DRM driver. Thanks for the lengthy answer. I don't want to add work to your todo list. For vgacon, I wouldn't remove it yet, as there still exisits x86_64 systems with plain VGA support. Best regards Thomas > > Arnd > -- -- Thomas Zimmermann Graphics Driver Developer SUSE Software Solutions Germany GmbH Frankenstrasse 146, 90461 Nuernberg, Germany GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman HRB 36809 (AG Nuernberg) ^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 1/3] dummycon: only build module if there are users 2025-02-25 16:44 [PATCH 1/3] dummycon: only build module if there are users Arnd Bergmann ` (2 preceding siblings ...) 2025-02-26 7:48 ` [PATCH 1/3] dummycon: only build module if there are users Thomas Zimmermann @ 2025-03-09 1:46 ` Helge Deller 3 siblings, 0 replies; 15+ messages in thread From: Helge Deller @ 2025-03-09 1:46 UTC (permalink / raw) To: Arnd Bergmann, Greg Kroah-Hartman Cc: Arnd Bergmann, linux-fbdev, dri-devel, linux-kernel On 2/25/25 17:44, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > Dummycon is used as a fallback conswitchp for vgacon and fbcon > in the VT code, and there are no references to it if all three > are disabled, so just leave it out of the kernel image for > configurations without those. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > --- > drivers/video/console/Kconfig | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) whole series applied to fbdev git tree. Thanks! Helge ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2025-03-09 1:46 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-02-25 16:44 [PATCH 1/3] dummycon: only build module if there are users Arnd Bergmann 2025-02-25 16:44 ` [PATCH 2/3] dummycon: fix default rows/cols Arnd Bergmann 2025-02-26 7:54 ` Thomas Zimmermann 2025-02-25 16:44 ` [PATCH 3/3] mdacon: rework dependency list Arnd Bergmann 2025-02-26 8:08 ` Thomas Zimmermann 2025-02-26 7:48 ` [PATCH 1/3] dummycon: only build module if there are users Thomas Zimmermann 2025-02-26 7:53 ` Thomas Zimmermann 2025-02-26 7:55 ` Arnd Bergmann 2025-02-26 8:16 ` Thomas Zimmermann 2025-02-26 11:46 ` Arnd Bergmann 2025-02-26 12:05 ` Javier Martinez Canillas 2025-02-26 13:18 ` Arnd Bergmann 2025-02-26 16:35 ` Helge Deller 2025-02-27 9:25 ` Thomas Zimmermann 2025-03-09 1:46 ` Helge Deller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox