diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 8b5fe0ffda49fe9c7cec7b3259be4b5ac163bbba..95e9dcfc651e6f0cba6318f9012b7219856a95f5 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1685,11 +1685,12 @@ int video_display_bitmap(ulong bmp_image, int x, int y) } #endif - -#ifdef CONFIG_VIDEO_LOGO +#if defined(CONFIG_VIDEO_LOGO) || defined(CONFIG_SPLASH_SCREEN) static int video_logo_xpos; static int video_logo_ypos; +#endif +#ifdef CONFIG_VIDEO_LOGO static void plot_logo_or_black(void *screen, int x, int y, int black); static void logo_plot(void *screen, int x, int y) @@ -1844,13 +1845,19 @@ static void plot_logo_or_black(void *screen, int x, int y, int black) #endif } +#endif + +#if defined(CONFIG_VIDEO_LOGO) || defined(CONFIG_SPLASH_SCREEN) static void *video_logo(void) { +#ifdef CONFIG_VIDEO_LOGO char info[128]; + __maybe_unused int len, space; +#endif __maybe_unused int y_off = 0; __maybe_unused ulong addr; __maybe_unused char *s; - __maybe_unused int len, ret, space; + __maybe_unused int ret; splash_get_pos(&video_logo_xpos, &video_logo_ypos); @@ -1871,6 +1878,7 @@ static void *video_logo(void) } #endif /* CONFIG_SPLASH_SCREEN */ +#ifdef CONFIG_VIDEO_LOGO logo_plot(video_fb_address, video_logo_xpos, video_logo_ypos); #ifdef CONFIG_SPLASH_SCREEN_ALIGN @@ -1966,6 +1974,7 @@ static void *video_logo(void) #endif #endif +#endif return (video_fb_address + video_logo_height * VIDEO_LINE_LEN); } #endif @@ -2099,11 +2108,12 @@ static int cfg_video_init(void) if (!CONFIG_IS_ENABLED(NO_FB_CLEAR)) video_clear(); -#ifdef CONFIG_VIDEO_LOGO +#if defined(CONFIG_VIDEO_LOGO) || defined(CONFIG_SPLASH_SCREEN) /* Plot the logo and get start point of console */ debug("Video: Drawing the logo ...\n"); video_console_address = video_logo(); -#else +#endif +#ifndef CONFIG_VIDEO_LOGO if (!board_cfb_skip()){ video_console_address = video_fb_address; video_drawstring(VIDEO_FONT_WIDTH, 0, (uchar *)version_string);