All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] video: restore CONFIG_VIDCONSOLE_AS_LCD as boolean
@ 2020-07-01 12:56 Patrick Delaunay
  2020-07-03  3:50 ` Simon Glass
  2020-07-07 13:38 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Patrick Delaunay @ 2020-07-01 12:56 UTC (permalink / raw)
  To: u-boot

This patch restores CONFIG_VIDCONSOLE_AS_LCD as boolean
and introduce a separate sting as CONFIG_VIDCONSOLE_AS_NAME
to search this string in stdout used as videoconsole.

This patch avoid issue with board defconfig or code expecting
CONFIG_VIDCONSOLE_AS_LCD as boolean.

Fixes: 22b897a12323 ("video: extend stdout video console work-around for 'vga'")
Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
---
Hi,

It is fix for stm32mp157c-ev1 boot on next branch.

The option names are not perfect but it is only a temporarily
work around (up to end of 2020).

You can see other example of boolean and string in Kconfig =
  config USE_BOOTCOMMAND
  config BOOTCOMMAND

I think the correct name could be:
- CONFIG_USE_VIDCONSOLE_AS_NAME
- CONFIG_VIDCONSOLE_AS_NAME

but these name need to modify many file for a fix on a workaround
CONFIG.

Regards,

Patrick


 common/console.c      |  6 +++---
 drivers/video/Kconfig | 12 +++++++++++-
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/common/console.c b/common/console.c
index f149624954..7b9816979a 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, CONFIG_VIDCONSOLE_AS_LCD))
+	if (!dev && !strcmp(name, CONFIG_VIDCONSOLE_AS_NAME))
 		dev = stdio_get_by_name("vidconsole");
 #endif
 
@@ -897,9 +897,9 @@ done:
 	stdio_print_current_devices();
 #endif /* CONFIG_SYS_CONSOLE_INFO_QUIET */
 #ifdef CONFIG_VIDCONSOLE_AS_LCD
-	if (strstr(stdoutname, CONFIG_VIDCONSOLE_AS_LCD))
+	if (strstr(stdoutname, CONFIG_VIDCONSOLE_AS_NAME))
 		printf("Warning: Please change '%s' to 'vidconsole' in stdout/stderr environment vars\n",
-		       CONFIG_VIDCONSOLE_AS_LCD);
+		       CONFIG_VIDCONSOLE_AS_NAME);
 #endif
 
 #ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 52f5bc6127..0cf13adc7d 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -177,8 +177,18 @@ config SIMPLE_PANEL
 source "drivers/video/fonts/Kconfig"
 
 config VIDCONSOLE_AS_LCD
-	string "Use 'vidconsole' when string defined here is seen in stdout"
+	bool "Use 'vidconsole' when CONFIG_VIDCONSOLE_AS_NAME string is seen in stdout"
 	depends on DM_VIDEO
+	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 VIDCONSOLE_AS_NAME
+	string "Use 'vidconsole' when string defined here is seen in stdout"
+	depends on VIDCONSOLE_AS_LCD
 	default "lcd" if LCD || TEGRA_COMMON
 	default "vga" if !LCD
 	help
-- 
2.17.1

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

* [PATCH] video: restore CONFIG_VIDCONSOLE_AS_LCD as boolean
  2020-07-01 12:56 [PATCH] video: restore CONFIG_VIDCONSOLE_AS_LCD as boolean Patrick Delaunay
@ 2020-07-03  3:50 ` Simon Glass
  2020-07-07 13:38 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2020-07-03  3:50 UTC (permalink / raw)
  To: u-boot

On Wed, 1 Jul 2020 at 06:56, Patrick Delaunay <patrick.delaunay@st.com> wrote:
>
> This patch restores CONFIG_VIDCONSOLE_AS_LCD as boolean
> and introduce a separate sting as CONFIG_VIDCONSOLE_AS_NAME
> to search this string in stdout used as videoconsole.
>
> This patch avoid issue with board defconfig or code expecting
> CONFIG_VIDCONSOLE_AS_LCD as boolean.
>
> Fixes: 22b897a12323 ("video: extend stdout video console work-around for 'vga'")
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
> ---
> Hi,
>
> It is fix for stm32mp157c-ev1 boot on next branch.
>
> The option names are not perfect but it is only a temporarily
> work around (up to end of 2020).
>
> You can see other example of boolean and string in Kconfig =
>   config USE_BOOTCOMMAND
>   config BOOTCOMMAND
>
> I think the correct name could be:
> - CONFIG_USE_VIDCONSOLE_AS_NAME
> - CONFIG_VIDCONSOLE_AS_NAME
>
> but these name need to modify many file for a fix on a workaround
> CONFIG.
>
> Regards,
>
> Patrick
>
>
>  common/console.c      |  6 +++---
>  drivers/video/Kconfig | 12 +++++++++++-
>  2 files changed, 14 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

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

* [PATCH] video: restore CONFIG_VIDCONSOLE_AS_LCD as boolean
  2020-07-01 12:56 [PATCH] video: restore CONFIG_VIDCONSOLE_AS_LCD as boolean Patrick Delaunay
  2020-07-03  3:50 ` Simon Glass
@ 2020-07-07 13:38 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-07-07 13:38 UTC (permalink / raw)
  To: u-boot

On Wed, Jul 01, 2020 at 02:56:10PM +0200, Patrick Delaunay wrote:

> This patch restores CONFIG_VIDCONSOLE_AS_LCD as boolean
> and introduce a separate sting as CONFIG_VIDCONSOLE_AS_NAME
> to search this string in stdout used as videoconsole.
> 
> This patch avoid issue with board defconfig or code expecting
> CONFIG_VIDCONSOLE_AS_LCD as boolean.
> 
> Fixes: 22b897a12323 ("video: extend stdout video console work-around for 'vga'")
> Reviewed-by: Simon Glass <sjg@chromium.org>
> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200707/8347556c/attachment.sig>

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

end of thread, other threads:[~2020-07-07 13:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-01 12:56 [PATCH] video: restore CONFIG_VIDCONSOLE_AS_LCD as boolean Patrick Delaunay
2020-07-03  3:50 ` Simon Glass
2020-07-07 13:38 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.