diff mbox

[U-Boot] video: allow version string to be optional when using LOGO

Message ID 1464127199-7315-1-git-send-email-tharvey@gateworks.com
State Superseded
Delegated to: Anatolij Gustschin
Headers show

Commit Message

Tim Harvey May 24, 2016, 9:59 p.m. UTC
The CONFIG_HIDE_LOGO_VERSION config can be used to disable putting the
U-Boot version string on top of the logo.

Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
 README                      | 3 +++
 drivers/video/cfb_console.c | 4 +++-
 2 files changed, 6 insertions(+), 1 deletion(-)

Comments

Tim Harvey July 8, 2016, 1:45 p.m. UTC | #1
On Tue, May 24, 2016 at 2:59 PM, Tim Harvey <tharvey@gateworks.com> wrote:
> The CONFIG_HIDE_LOGO_VERSION config can be used to disable putting the
> U-Boot version string on top of the logo.
>
> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
> ---
>  README                      | 3 +++
>  drivers/video/cfb_console.c | 4 +++-
>  2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/README b/README
> index d881da2..a820079 100644
> --- a/README
> +++ b/README
> @@ -840,6 +840,9 @@ The following options need to be configured:
>                         CONFIG_CONSOLE_EXTRA_INFO
>                                                 additional board info beside
>                                                 the logo
> +                       CONFIG_HIDE_LOGO_VERSION
> +                                               do not display bootloader
> +                                               version string
>
>                 When CONFIG_CFB_CONSOLE_ANSI is defined, console will support
>                 a limited number of ANSI escape sequences (cursor control,
> diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
> index ef4984b..b2b4a35 100644
> --- a/drivers/video/cfb_console.c
> +++ b/drivers/video/cfb_console.c
> @@ -1929,7 +1929,6 @@ static void plot_logo_or_black(void *screen, int x, int y, int black)
>  static void *video_logo(void)
>  {
>         char info[128];
> -       int space, len;
>         __maybe_unused int y_off = 0;
>         __maybe_unused ulong addr;
>         __maybe_unused char *s;
> @@ -1978,6 +1977,8 @@ static void *video_logo(void)
>
>         sprintf(info, " %s", version_string);
>
> +#ifndef CONFIG_HIDE_LOGO_VERSION
> +       int space, len;
>         space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
>         len = strlen(info);
>
> @@ -1990,6 +1991,7 @@ static void *video_logo(void)
>                 y_off = 1;
>         } else
>                 video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
> +#endif
>
>  #ifdef CONFIG_CONSOLE_EXTRA_INFO
>         {
> --
> 1.9.1
>

Anatolij / Tom,

I haven't seen any feedback on this. Do you have any comment or ack?

Regards,

Tim
Anatolij Gustschin July 11, 2016, 4:56 p.m. UTC | #2
Hi Tim,

On Fri, 8 Jul 2016 06:45:10 -0700
Tim Harvey tharvey@gateworks.com wrote:
...
> I haven't seen any feedback on this. Do you have any comment or ack?

sorry for delay, I was on vacation. Applied slightly modified patch
to u-boot-video/next.

Thanks,

Anatolij
diff mbox

Patch

diff --git a/README b/README
index d881da2..a820079 100644
--- a/README
+++ b/README
@@ -840,6 +840,9 @@  The following options need to be configured:
 			CONFIG_CONSOLE_EXTRA_INFO
 						additional board info beside
 						the logo
+			CONFIG_HIDE_LOGO_VERSION
+						do not display bootloader
+						version string
 
 		When CONFIG_CFB_CONSOLE_ANSI is defined, console will support
 		a limited number of ANSI escape sequences (cursor control,
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index ef4984b..b2b4a35 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -1929,7 +1929,6 @@  static void plot_logo_or_black(void *screen, int x, int y, int black)
 static void *video_logo(void)
 {
 	char info[128];
-	int space, len;
 	__maybe_unused int y_off = 0;
 	__maybe_unused ulong addr;
 	__maybe_unused char *s;
@@ -1978,6 +1977,8 @@  static void *video_logo(void)
 
 	sprintf(info, " %s", version_string);
 
+#ifndef CONFIG_HIDE_LOGO_VERSION
+	int space, len;
 	space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
 	len = strlen(info);
 
@@ -1990,6 +1991,7 @@  static void *video_logo(void)
 		y_off = 1;
 	} else
 		video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
+#endif
 
 #ifdef CONFIG_CONSOLE_EXTRA_INFO
 	{