* [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var
@ 2016-02-06 21:31 Simon Glass
2016-02-06 21:31 ` [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around Simon Glass
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Simon Glass @ 2016-02-06 21:31 UTC (permalink / raw)
To: u-boot
Boards with a saved environment may use 'lcd' in their stdout environment
variable, expecting that this will enable output to the LCD. When the board
moves to use driver model for video, this will no-longer work. Add a
work-around to fix this. A warning messages is printed, and we will remove
the work-around at the end of 2016.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
common/console.c | 8 ++++++++
drivers/video/Kconfig | 10 ++++++++++
2 files changed, 18 insertions(+)
diff --git a/common/console.c b/common/console.c
index b3f5fdc..6a0d11b 100644
--- a/common/console.c
+++ b/common/console.c
@@ -650,6 +650,10 @@ struct stdio_dev *search_device(int flags, const char *name)
struct stdio_dev *dev;
dev = stdio_get_by_name(name);
+#ifdef CONFIG_VIDCONSOLE_AS_LCD
+ if (!dev && !strcmp(name, "lcd"))
+ dev = stdio_get_by_name("vidconsole");
+#endif
if (dev && (dev->flags & flags))
return dev;
@@ -795,6 +799,10 @@ done:
#ifndef CONFIG_SYS_CONSOLE_INFO_QUIET
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");
+#endif
#ifdef CONFIG_SYS_CONSOLE_ENV_OVERWRITE
/* set the environment variables (will overwrite previous env settings) */
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 981ba8b..ae6c244 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -57,6 +57,16 @@ config VIDEO_ROTATION
struct video_priv: 0=unrotated, 1=90 degrees clockwise, 2=180
degrees, 3=270 degrees.
+config VIDCONSOLE_AS_LCD
+ bool "Use 'vidconsole' when 'lcd' 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.
+
config VIDEO_VESA
bool "Enable VESA video driver support"
default n
--
2.7.0.rc3.207.g0ac5344
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around
2016-02-06 21:31 [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var Simon Glass
@ 2016-02-06 21:31 ` Simon Glass
2016-02-06 22:23 ` Anatolij Gustschin
2016-02-11 20:40 ` Anatolij Gustschin
2016-02-06 22:23 ` [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var Anatolij Gustschin
` (2 subsequent siblings)
3 siblings, 2 replies; 8+ messages in thread
From: Simon Glass @ 2016-02-06 21:31 UTC (permalink / raw)
To: u-boot
Enable this option on all tegra boards.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
arch/arm/mach-tegra/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 66298d5..3540eda 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -14,6 +14,7 @@ config TEGRA_COMMON
select DM_SPI
select DM_SPI_FLASH
select OF_CONTROL
+ select VIDCONSOLE_AS_LCD
config TEGRA_ARMV7_COMMON
bool "Tegra 32-bit common options"
--
2.7.0.rc3.207.g0ac5344
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var
2016-02-06 21:31 [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var Simon Glass
2016-02-06 21:31 ` [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around Simon Glass
@ 2016-02-06 22:23 ` Anatolij Gustschin
2016-02-08 21:09 ` Stephen Warren
2016-02-11 20:38 ` Anatolij Gustschin
3 siblings, 0 replies; 8+ messages in thread
From: Anatolij Gustschin @ 2016-02-06 22:23 UTC (permalink / raw)
To: u-boot
Hi Simon,
On Sat, 6 Feb 2016 14:31:37 -0700
Simon Glass sjg at chromium.org wrote:
> Boards with a saved environment may use 'lcd' in their stdout environment
> variable, expecting that this will enable output to the LCD. When the board
> moves to use driver model for video, this will no-longer work. Add a
> work-around to fix this. A warning messages is printed, and we will remove
> the work-around at the end of 2016.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> common/console.c | 8 ++++++++
> drivers/video/Kconfig | 10 ++++++++++
> 2 files changed, 18 insertions(+)
Acked-by: Anatolij Gustschin <agust@denx.de>
--
Anatolij
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around
2016-02-06 21:31 ` [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around Simon Glass
@ 2016-02-06 22:23 ` Anatolij Gustschin
2016-02-11 20:40 ` Anatolij Gustschin
1 sibling, 0 replies; 8+ messages in thread
From: Anatolij Gustschin @ 2016-02-06 22:23 UTC (permalink / raw)
To: u-boot
On Sat, 6 Feb 2016 14:31:38 -0700
Simon Glass sjg at chromium.org wrote:
> Enable this option on all tegra boards.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> arch/arm/mach-tegra/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
Acked-by: Anatolij Gustschin <agust@denx.de>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var
2016-02-06 21:31 [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var Simon Glass
2016-02-06 21:31 ` [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around Simon Glass
2016-02-06 22:23 ` [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var Anatolij Gustschin
@ 2016-02-08 21:09 ` Stephen Warren
2016-02-11 20:28 ` Simon Glass
2016-02-11 20:38 ` Anatolij Gustschin
3 siblings, 1 reply; 8+ messages in thread
From: Stephen Warren @ 2016-02-08 21:09 UTC (permalink / raw)
To: u-boot
On 02/06/2016 02:31 PM, Simon Glass wrote:
> Boards with a saved environment may use 'lcd' in their stdout environment
> variable, expecting that this will enable output to the LCD. When the board
> moves to use driver model for video, this will no-longer work. Add a
> work-around to fix this. A warning messages is printed, and we will remove
> the work-around at the end of 2016.
I tested u-boot-dm/tegra-working which I assume is the same as these
patches, so the series,
Tested-by: Stephen Warren <swarren@nvidia.com>
But...
> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
> +config VIDCONSOLE_AS_LCD
> + bool "Use 'vidconsole' when 'lcd' 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.
Removing this option at the end of 2016 is simply going to cause the
exact same problem then. Is there any harm in simply not deprecating
this feature? I suppose at least there's a warning that people should
convert over, so perhaps they will and so the chances of people getting
bitten by this well be less by then.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var
2016-02-08 21:09 ` Stephen Warren
@ 2016-02-11 20:28 ` Simon Glass
0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2016-02-11 20:28 UTC (permalink / raw)
To: u-boot
Hi Stephen,
On 8 February 2016 at 14:09, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 02/06/2016 02:31 PM, Simon Glass wrote:
>>
>> Boards with a saved environment may use 'lcd' in their stdout environment
>> variable, expecting that this will enable output to the LCD. When the
>> board
>> moves to use driver model for video, this will no-longer work. Add a
>> work-around to fix this. A warning messages is printed, and we will remove
>> the work-around at the end of 2016.
>
>
> I tested u-boot-dm/tegra-working which I assume is the same as these
> patches, so the series,
>
> Tested-by: Stephen Warren <swarren@nvidia.com>
>
> But...
>
>> diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
>
>
>> +config VIDCONSOLE_AS_LCD
>> + bool "Use 'vidconsole' when 'lcd' 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.
>
>
> Removing this option at the end of 2016 is simply going to cause the exact
> same problem then. Is there any harm in simply not deprecating this feature?
> I suppose at least there's a warning that people should convert over, so
> perhaps they will and so the chances of people getting bitten by this well
> be less by then.
Also we do need people to keep up with things to some extent.
Otherwise we end up with cruft that confuses people. There is a
prominent run-time message that people will see in the meantime.
What's the status of this series now? I'd like to see if it can be applied.
Regards,
Simon
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var
2016-02-06 21:31 [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var Simon Glass
` (2 preceding siblings ...)
2016-02-08 21:09 ` Stephen Warren
@ 2016-02-11 20:38 ` Anatolij Gustschin
3 siblings, 0 replies; 8+ messages in thread
From: Anatolij Gustschin @ 2016-02-11 20:38 UTC (permalink / raw)
To: u-boot
Hi Simon,
On Sat, 6 Feb 2016 14:31:37 -0700
Simon Glass sjg at chromium.org wrote:
> Boards with a saved environment may use 'lcd' in their stdout environment
> variable, expecting that this will enable output to the LCD. When the board
> moves to use driver model for video, this will no-longer work. Add a
> work-around to fix this. A warning messages is printed, and we will remove
> the work-around at the end of 2016.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> common/console.c | 8 ++++++++
> drivers/video/Kconfig | 10 ++++++++++
> 2 files changed, 18 insertions(+)
applied to u-boot-video/master, thanks!
--
Anatolij
^ permalink raw reply [flat|nested] 8+ messages in thread
* [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around
2016-02-06 21:31 ` [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around Simon Glass
2016-02-06 22:23 ` Anatolij Gustschin
@ 2016-02-11 20:40 ` Anatolij Gustschin
1 sibling, 0 replies; 8+ messages in thread
From: Anatolij Gustschin @ 2016-02-11 20:40 UTC (permalink / raw)
To: u-boot
On Sat, 6 Feb 2016 14:31:38 -0700
Simon Glass sjg at chromium.org wrote:
> Enable this option on all tegra boards.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> arch/arm/mach-tegra/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
applied to u-boot-video/master, thanks!
--
Anatolij
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-02-11 20:40 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-06 21:31 [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var Simon Glass
2016-02-06 21:31 ` [U-Boot] [PATCH 2/2] video: tegra: Enable the 'lcd' env variable work-around Simon Glass
2016-02-06 22:23 ` Anatolij Gustschin
2016-02-11 20:40 ` Anatolij Gustschin
2016-02-06 22:23 ` [U-Boot] [PATCH 1/2] dm: video: Add a temporary work-around for old stdout var Anatolij Gustschin
2016-02-08 21:09 ` Stephen Warren
2016-02-11 20:28 ` Simon Glass
2016-02-11 20:38 ` Anatolij Gustschin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox