linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/4] dummycon: limit Arm console size hack to footbridge
       [not found] <20230707095415.1449376-1-arnd@kernel.org>
@ 2023-07-07  9:52 ` Arnd Bergmann
  2023-07-07 11:33   ` Linus Walleij
  2023-07-07 13:41   ` Javier Martinez Canillas
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2023-07-07  9:52 UTC (permalink / raw)
  To: Thomas Zimmermann
  Cc: javierm, linux-fbdev, linux-kernel, Russell King, dri-devel,
	Ard Biesheuvel, Helge Deller, Greg Kroah-Hartman, Arnd Bergmann,
	Linus Walleij, Russell King (Oracle), linux-arm-kernel

From: Arnd Bergmann <arnd@arndb.de>

The dummycon default console size used to be determined by architecture,
but now this is a Kconfig setting on everything except ARM. Tracing this
back in the historic git trees, this was used to match the size of VGA
console or VGA framebuffer on early machines, but nowadays that code is
no longer used, except probably on the old footbridge/netwinder since
that is the only one that supports vgacon.

On machines with a framebuffer, booting with DT so far results in always
using the hardcoded 80x30 size in dummycon, while on ATAGS the setting
can come from a bootloader specific override. Both seem to be worse
choices than the Kconfig setting, since the actual text size for fbcon
also depends on the selected font.

Make this work the same way as everywhere else and use the normal
Kconfig setting, except for the footbridge with vgacon, which keeps
using the traditional code. If vgacon is disabled, footbridge can
also ignore the setting. This means the screen_info only has to be
provided when either vgacon or EFI are enabled now.

To limit the amount of surprises on Arm, change the Kconfig default
to the previously used 80x30 setting instead of the usual 80x25.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 arch/arm/kernel/atags_parse.c    | 2 +-
 arch/arm/kernel/setup.c          | 3 +--
 drivers/video/console/Kconfig    | 5 +++--
 drivers/video/console/dummycon.c | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/arm/kernel/atags_parse.c b/arch/arm/kernel/atags_parse.c
index 33f6eb5213a5a..4c815da3b77b0 100644
--- a/arch/arm/kernel/atags_parse.c
+++ b/arch/arm/kernel/atags_parse.c
@@ -69,7 +69,7 @@ static int __init parse_tag_mem32(const struct tag *tag)
 
 __tagtable(ATAG_MEM, parse_tag_mem32);
 
-#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
+#if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_VGA_CONSOLE)
 static int __init parse_tag_videotext(const struct tag *tag)
 {
 	screen_info.orig_x            = tag->u.videotext.x;
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
index c66b560562b30..40326a35a179b 100644
--- a/arch/arm/kernel/setup.c
+++ b/arch/arm/kernel/setup.c
@@ -928,8 +928,7 @@ static void __init request_standard_resources(const struct machine_desc *mdesc)
 		request_resource(&ioport_resource, &lp2);
 }
 
-#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) || \
-    defined(CONFIG_EFI)
+#if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_EFI)
 struct screen_info screen_info = {
  .orig_video_lines	= 30,
  .orig_video_cols	= 80,
diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
index 47c498defc211..a3e4e9a6bf79d 100644
--- a/drivers/video/console/Kconfig
+++ b/drivers/video/console/Kconfig
@@ -52,7 +52,7 @@ config DUMMY_CONSOLE
 
 config DUMMY_CONSOLE_COLUMNS
 	int "Initial number of console screen columns"
-	depends on DUMMY_CONSOLE && !ARM
+	depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE
 	default 160 if PARISC
 	default 80
 	help
@@ -62,8 +62,9 @@ config DUMMY_CONSOLE_COLUMNS
 
 config DUMMY_CONSOLE_ROWS
 	int "Initial number of console screen rows"
-	depends on DUMMY_CONSOLE && !ARM
+	depends on DUMMY_CONSOLE && !ARCH_FOOTBRIDGE
 	default 64 if PARISC
+	default 30 if ARM
 	default 25
 	help
 	  On PA-RISC, the default value is 64, which should fit a 1280x1024
diff --git a/drivers/video/console/dummycon.c b/drivers/video/console/dummycon.c
index f1711b2f9ff05..70549fecee12c 100644
--- a/drivers/video/console/dummycon.c
+++ b/drivers/video/console/dummycon.c
@@ -18,7 +18,7 @@
  *  Dummy console driver
  */
 
-#if defined(__arm__)
+#if defined(CONFIG_ARCH_FOOTBRIDGE) && defined(CONFIG_VGA_CONSOLE)
 #define DUMMY_COLUMNS	screen_info.orig_video_cols
 #define DUMMY_ROWS	screen_info.orig_video_lines
 #else
-- 
2.39.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] dummycon: limit Arm console size hack to footbridge
  2023-07-07  9:52 ` [PATCH 3/4] dummycon: limit Arm console size hack to footbridge Arnd Bergmann
@ 2023-07-07 11:33   ` Linus Walleij
  2023-07-07 14:27     ` Arnd Bergmann
  2023-07-07 13:41   ` Javier Martinez Canillas
  1 sibling, 1 reply; 5+ messages in thread
From: Linus Walleij @ 2023-07-07 11:33 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Thomas Zimmermann, javierm, linux-fbdev, linux-kernel,
	Russell King, dri-devel, Ard Biesheuvel, Helge Deller,
	Greg Kroah-Hartman, Arnd Bergmann, Russell King (Oracle),
	linux-arm-kernel

On Fri, Jul 7, 2023 at 11:56 AM Arnd Bergmann <arnd@kernel.org> wrote:

> From: Arnd Bergmann <arnd@arndb.de>
>
> The dummycon default console size used to be determined by architecture,
> but now this is a Kconfig setting on everything except ARM. Tracing this
> back in the historic git trees, this was used to match the size of VGA
> console or VGA framebuffer on early machines, but nowadays that code is
> no longer used, except probably on the old footbridge/netwinder since
> that is the only one that supports vgacon.
>
> On machines with a framebuffer, booting with DT so far results in always
> using the hardcoded 80x30 size in dummycon, while on ATAGS the setting
> can come from a bootloader specific override. Both seem to be worse
> choices than the Kconfig setting, since the actual text size for fbcon
> also depends on the selected font.
>
> Make this work the same way as everywhere else and use the normal
> Kconfig setting, except for the footbridge with vgacon, which keeps
> using the traditional code. If vgacon is disabled, footbridge can
> also ignore the setting. This means the screen_info only has to be
> provided when either vgacon or EFI are enabled now.
>
> To limit the amount of surprises on Arm, change the Kconfig default
> to the previously used 80x30 setting instead of the usual 80x25.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Tested this before and after patch and it looks the same on the NetWinder.
Tested-by: Linus Walleij <linus.walleij@linaro.org>

The legacy in the cyber2000 FB driver supports pseudocolor which
makes it a bit hard to rewrite into a simple DRM driver, which is something
I could otherwise look into, it's not a very big or complex driver
after all.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] dummycon: limit Arm console size hack to footbridge
  2023-07-07  9:52 ` [PATCH 3/4] dummycon: limit Arm console size hack to footbridge Arnd Bergmann
  2023-07-07 11:33   ` Linus Walleij
@ 2023-07-07 13:41   ` Javier Martinez Canillas
  1 sibling, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2023-07-07 13:41 UTC (permalink / raw)
  To: Arnd Bergmann, Thomas Zimmermann
  Cc: linux-fbdev, linux-kernel, Russell King, dri-devel,
	Ard Biesheuvel, Helge Deller, Greg Kroah-Hartman, Arnd Bergmann,
	Linus Walleij, Russell King (Oracle), linux-arm-kernel

Arnd Bergmann <arnd@kernel.org> writes:

> From: Arnd Bergmann <arnd@arndb.de>
>
> The dummycon default console size used to be determined by architecture,
> but now this is a Kconfig setting on everything except ARM. Tracing this
> back in the historic git trees, this was used to match the size of VGA
> console or VGA framebuffer on early machines, but nowadays that code is
> no longer used, except probably on the old footbridge/netwinder since
> that is the only one that supports vgacon.
>
> On machines with a framebuffer, booting with DT so far results in always
> using the hardcoded 80x30 size in dummycon, while on ATAGS the setting
> can come from a bootloader specific override. Both seem to be worse
> choices than the Kconfig setting, since the actual text size for fbcon
> also depends on the selected font.
>
> Make this work the same way as everywhere else and use the normal
> Kconfig setting, except for the footbridge with vgacon, which keeps
> using the traditional code. If vgacon is disabled, footbridge can
> also ignore the setting. This means the screen_info only has to be
> provided when either vgacon or EFI are enabled now.
>
> To limit the amount of surprises on Arm, change the Kconfig default
> to the previously used 80x30 setting instead of the usual 80x25.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---

Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>

-- 
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] dummycon: limit Arm console size hack to footbridge
  2023-07-07 11:33   ` Linus Walleij
@ 2023-07-07 14:27     ` Arnd Bergmann
  2023-07-16 21:22       ` Linus Walleij
  0 siblings, 1 reply; 5+ messages in thread
From: Arnd Bergmann @ 2023-07-07 14:27 UTC (permalink / raw)
  To: Linus Walleij, Arnd Bergmann
  Cc: Thomas Zimmermann, Javier Martinez Canillas, linux-fbdev,
	linux-kernel, Russell King, dri-devel, Ard Biesheuvel,
	Helge Deller, Greg Kroah-Hartman, Russell King, linux-arm-kernel

On Fri, Jul 7, 2023, at 13:33, Linus Walleij wrote:
> On Fri, Jul 7, 2023 at 11:56 AM Arnd Bergmann <arnd@kernel.org> wrote:
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>
> Tested this before and after patch and it looks the same on the NetWinder.
> Tested-by: Linus Walleij <linus.walleij@linaro.org>

Great, thanks for testing!

> The legacy in the cyber2000 FB driver supports pseudocolor which
> makes it a bit hard to rewrite into a simple DRM driver, which is something
> I could otherwise look into, it's not a very big or complex driver
> after all.

Not sure if that's worth it, my feeling is that we are stuck with
fbdev on a lot of other workstations of the era, so unless someone
puts significant energy into converting all the others as well, there
is little benefit of changing this one. It would be a little different
on platforms that actually run a regular Debian distro kernel that
is shared with modern machines.

Since you have already spent the time to build and test a kernel with
this patch, can you do one more test here and check the text size
reported in the atags on this machine and the actual text sizes you
get from both vgacon and cyber2000fb?

     Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 3/4] dummycon: limit Arm console size hack to footbridge
  2023-07-07 14:27     ` Arnd Bergmann
@ 2023-07-16 21:22       ` Linus Walleij
  0 siblings, 0 replies; 5+ messages in thread
From: Linus Walleij @ 2023-07-16 21:22 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Arnd Bergmann, Thomas Zimmermann, Javier Martinez Canillas,
	linux-fbdev, linux-kernel, Russell King, dri-devel,
	Ard Biesheuvel, Helge Deller, Greg Kroah-Hartman, Russell King,
	linux-arm-kernel

On Fri, Jul 7, 2023 at 4:28 PM Arnd Bergmann <arnd@arndb.de> wrote:

> Since you have already spent the time to build and test a kernel with
> this patch, can you do one more test here and check the text size
> reported in the atags on this machine and the actual text sizes you
> get from both vgacon and cyber2000fb?

Heh I tested this then walked out of the office for vacation.

But I can put a note in my calendar to test it when I return to
my equipment!

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-16 21:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20230707095415.1449376-1-arnd@kernel.org>
2023-07-07  9:52 ` [PATCH 3/4] dummycon: limit Arm console size hack to footbridge Arnd Bergmann
2023-07-07 11:33   ` Linus Walleij
2023-07-07 14:27     ` Arnd Bergmann
2023-07-16 21:22       ` Linus Walleij
2023-07-07 13:41   ` Javier Martinez Canillas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).