Message ID | 20200523151120.4273-1-agust@denx.de |
---|---|
State | Accepted |
Commit | 22b897a12323364c584b1ff31fe9f5250e0d3481 |
Delegated to: | Anatolij Gustschin |
Headers | show |
Series | video: extend stdout video console work-around for 'vga' | expand |
On 23.05.20 17:11, Anatolij Gustschin wrote: > cfb_console driver use 'vga' console name and we still have board > environments defining this name. Re-use existing DM_VIDEO work- > around for console name to support 'vga' name in stdout environment. > > Signed-off-by: Anatolij Gustschin <agust@denx.de> Tested on tbs2910, works as intended. Tested-by: Soeren Moch <smoch@web.de> Thanks, Soeren > --- > arch/arm/mach-tegra/Kconfig | 1 - > common/console.c | 7 ++++--- > drivers/video/Kconfig | 16 +++++++++------- > 3 files changed, 13 insertions(+), 11 deletions(-) > > diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig > index 00facf492e..15e7684028 100644 > --- a/arch/arm/mach-tegra/Kconfig > +++ b/arch/arm/mach-tegra/Kconfig > @@ -58,7 +58,6 @@ config TEGRA_COMMON > select MISC > select OF_CONTROL > select SPI > - select VIDCONSOLE_AS_LCD if DM_VIDEO > imply CMD_DM > imply CRC32_VERIFY > > diff --git a/common/console.c b/common/console.c > index 1deca3cb78..f149624954 100644 > --- a/common/console.c > +++ b/common/console.c > @@ -713,7 +713,7 @@ struct stdio_dev *search_device(int flags, const char *name) > > dev = stdio_get_by_name(name); > #ifdef CONFIG_VIDCONSOLE_AS_LCD > - if (!dev && !strcmp(name, "lcd")) > + if (!dev && !strcmp(name, CONFIG_VIDCONSOLE_AS_LCD)) > dev = stdio_get_by_name("vidconsole"); > #endif > > @@ -897,8 +897,9 @@ done: > stdio_print_current_devices(); > #endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ > #ifdef CONFIG_VIDCONSOLE_AS_LCD > - if (strstr(stdoutname, "lcd")) > - printf("Warning: Please change 'lcd' to 'vidconsole' in stdout/stderr environment vars\n"); > + if (strstr(stdoutname, CONFIG_VIDCONSOLE_AS_LCD)) > + printf("Warning: Please change '%s' to 'vidconsole' in stdout/stderr environment vars\n", > + CONFIG_VIDCONSOLE_AS_LCD); > #endif > > #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE > diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig > index 38123543a5..28c22fe525 100644 > --- a/drivers/video/Kconfig > +++ b/drivers/video/Kconfig > @@ -146,14 +146,16 @@ config NO_FB_CLEAR > source "drivers/video/fonts/Kconfig" > > config VIDCONSOLE_AS_LCD > - bool "Use 'vidconsole' when 'lcd' is seen in stdout" > + string "Use 'vidconsole' when string defined here is seen in stdout" > depends on DM_VIDEO > - help > - This is a work-around for boards which have 'lcd' in their stdout > - environment variable, but have moved to use driver model for video. > - In this case the console will no-longer work. While it is possible > - to update the environment, the breakage may be confusing for users. > - This option will be removed around the end of 2016. > + default "lcd" if LCD || TEGRA_COMMON > + default "vga" if !LCD > + help > + This is a work-around for boards which have 'lcd' or 'vga' in their > + stdout environment variable, but have moved to use driver model for > + video. In this case the console will no-longer work. While it is > + possible to update the environment, the breakage may be confusing for > + users. This option will be removed around the end of 2020. > > config VIDEO_COREBOOT > bool "Enable coreboot framebuffer driver support"
On Sat, 23 May 2020 at 09:11, Anatolij Gustschin <agust@denx.de> wrote: > > cfb_console driver use 'vga' console name and we still have board > environments defining this name. Re-use existing DM_VIDEO work- > around for console name to support 'vga' name in stdout environment. > > Signed-off-by: Anatolij Gustschin <agust@denx.de> > --- > arch/arm/mach-tegra/Kconfig | 1 - > common/console.c | 7 ++++--- > drivers/video/Kconfig | 16 +++++++++------- > 3 files changed, 13 insertions(+), 11 deletions(-) Reviewed-by: Simon Glass <sjg@chromium.org>
On Sat, May 23, 2020 at 05:11:20PM +0200, Anatolij Gustschin wrote: > cfb_console driver use 'vga' console name and we still have board > environments defining this name. Re-use existing DM_VIDEO work- > around for console name to support 'vga' name in stdout environment. > > Signed-off-by: Anatolij Gustschin <agust@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
On Sat, 23 May 2020 17:11:20 +0200 Anatolij Gustschin agust@denx.de wrote: > cfb_console driver use 'vga' console name and we still have board > environments defining this name. Re-use existing DM_VIDEO work- > around for console name to support 'vga' name in stdout environment. > > Signed-off-by: Anatolij Gustschin <agust@denx.de> > --- > arch/arm/mach-tegra/Kconfig | 1 - > common/console.c | 7 ++++--- > drivers/video/Kconfig | 16 +++++++++------- > 3 files changed, 13 insertions(+), 11 deletions(-) Applied to u-boot-video/next, thanks! -- Anatolij
Hi Anatolij > From: U-Boot <u-boot-bounces@lists.denx.de> On Behalf Of Anatolij Gustschin > Sent: vendredi 19 juin 2020 15:56 > > On Sat, 23 May 2020 17:11:20 +0200 > Anatolij Gustschin agust@denx.de wrote: > > > cfb_console driver use 'vga' console name and we still have board > > environments defining this name. Re-use existing DM_VIDEO work- around > > for console name to support 'vga' name in stdout environment. > > > > Signed-off-by: Anatolij Gustschin <agust@denx.de> > > --- > > arch/arm/mach-tegra/Kconfig | 1 - > > common/console.c | 7 ++++--- > > drivers/video/Kconfig | 16 +++++++++------- > > 3 files changed, 13 insertions(+), 11 deletions(-) > > Applied to u-boot-video/next, thanks! This patch breaks the stm32mp15 boot in console_init_r.on the next branch. The board have with DM_VIDEO activated. In previous version the workaround was not activated for the board: CONFIG_VIDCONSOLE_AS_LCD=n (default) PS: the config is activated in few board but still as bolean but defined as sting in Kconfig configs/peach-pit_defconfig:76:CONFIG_VIDCONSOLE_AS_LCD=y configs/snow_defconfig:87:CONFIG_VIDCONSOLE_AS_LCD=y configs/peach-pi_defconfig:77:CONFIG_VIDCONSOLE_AS_LCD=y configs/spring_defconfig:88:CONFIG_VIDCONSOLE_AS_LCD=y Now it is a string, the CONFIG is always defined = value is "lcd" or "vga" or "" And the code in console.c under this compilation flags cause the crash. I push a patch [1] to fix up it this update: VIDCONSOLE_AS_LCD => Boolean used in defconfig as previously VIDCONSOLE_AS_NAME => name the the string to used.... NEW [1] "video: restore CONFIG_VIDCONSOLE_AS_LCD as Boolean" Regards Patrick
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index 00facf492e..15e7684028 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -58,7 +58,6 @@ config TEGRA_COMMON select MISC select OF_CONTROL select SPI - select VIDCONSOLE_AS_LCD if DM_VIDEO imply CMD_DM imply CRC32_VERIFY diff --git a/common/console.c b/common/console.c index 1deca3cb78..f149624954 100644 --- a/common/console.c +++ b/common/console.c @@ -713,7 +713,7 @@ struct stdio_dev *search_device(int flags, const char *name) dev = stdio_get_by_name(name); #ifdef CONFIG_VIDCONSOLE_AS_LCD - if (!dev && !strcmp(name, "lcd")) + if (!dev && !strcmp(name, CONFIG_VIDCONSOLE_AS_LCD)) dev = stdio_get_by_name("vidconsole"); #endif @@ -897,8 +897,9 @@ done: stdio_print_current_devices(); #endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */ #ifdef CONFIG_VIDCONSOLE_AS_LCD - if (strstr(stdoutname, "lcd")) - printf("Warning: Please change 'lcd' to 'vidconsole' in stdout/stderr environment vars\n"); + if (strstr(stdoutname, CONFIG_VIDCONSOLE_AS_LCD)) + printf("Warning: Please change '%s' to 'vidconsole' in stdout/stderr environment vars\n", + CONFIG_VIDCONSOLE_AS_LCD); #endif #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig index 38123543a5..28c22fe525 100644 --- a/drivers/video/Kconfig +++ b/drivers/video/Kconfig @@ -146,14 +146,16 @@ config NO_FB_CLEAR source "drivers/video/fonts/Kconfig" config VIDCONSOLE_AS_LCD - bool "Use 'vidconsole' when 'lcd' is seen in stdout" + string "Use 'vidconsole' when string defined here is seen in stdout" depends on DM_VIDEO - help - This is a work-around for boards which have 'lcd' in their stdout - environment variable, but have moved to use driver model for video. - In this case the console will no-longer work. While it is possible - to update the environment, the breakage may be confusing for users. - This option will be removed around the end of 2016. + default "lcd" if LCD || TEGRA_COMMON + default "vga" if !LCD + help + This is a work-around for boards which have 'lcd' or 'vga' in their + stdout environment variable, but have moved to use driver model for + video. In this case the console will no-longer work. While it is + possible to update the environment, the breakage may be confusing for + users. This option will be removed around the end of 2020. config VIDEO_COREBOOT bool "Enable coreboot framebuffer driver support"
cfb_console driver use 'vga' console name and we still have board environments defining this name. Re-use existing DM_VIDEO work- around for console name to support 'vga' name in stdout environment. Signed-off-by: Anatolij Gustschin <agust@denx.de> --- arch/arm/mach-tegra/Kconfig | 1 - common/console.c | 7 ++++--- drivers/video/Kconfig | 16 +++++++++------- 3 files changed, 13 insertions(+), 11 deletions(-)