+// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2002 ELTEC Elektronik AG
* Frank Gottschling <fgottschling@eltec.de>
- *
- * SPDX-License-Identifier: GPL-2.0+
*/
/*
*/
#include <common.h>
+#include <env.h>
#include <fdtdec.h>
+#include <gzip.h>
#include <version.h>
#include <malloc.h>
#include <video.h>
break;
case '\n': /* next line */
- if (console_col || (!console_col && nl))
+ if (console_col || nl)
console_newline(1);
nl = 1;
break;
break;
}
}
+
+ if (cfb_do_flush_cache)
+ flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
+
return 0;
error:
printf("Error: Too much encoded pixel data, validate your bitmap\n");
splash_get_pos(&video_logo_xpos, &video_logo_ypos);
#ifdef CONFIG_SPLASH_SCREEN
- s = getenv("splashimage");
+ s = env_get("splashimage");
if (s != NULL) {
ret = splash_screen_prepare();
if (ret < 0)
sprintf(info, " %s", version_string);
#ifndef CONFIG_HIDE_LOGO_VERSION
- space = (VIDEO_LINE_LEN / 2 - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
+ space = (VIDEO_COLS - VIDEO_INFO_X) / VIDEO_FONT_WIDTH;
len = strlen(info);
if (len > space) {
- video_drawchars(VIDEO_INFO_X, VIDEO_INFO_Y,
- (uchar *) info, space);
- video_drawchars(VIDEO_INFO_X + VIDEO_FONT_WIDTH,
- VIDEO_INFO_Y + VIDEO_FONT_HEIGHT,
- (uchar *) info + space, len - space);
- y_off = 1;
+ int xx = VIDEO_INFO_X, yy = VIDEO_INFO_Y;
+ uchar *p = (uchar *) info;
+
+ while (len) {
+ if (len > space) {
+ video_drawchars(xx, yy, p, space);
+ len -= space;
+
+ p = (uchar *)p + space;
+
+ if (!y_off) {
+ xx += VIDEO_FONT_WIDTH;
+ space--;
+ }
+ yy += VIDEO_FONT_HEIGHT;
+
+ y_off++;
+ } else {
+ video_drawchars(xx, yy, p, len);
+ len = 0;
+ }
+ }
} else
video_drawstring(VIDEO_INFO_X, VIDEO_INFO_Y, (uchar *) info);
}
eorx = fgx ^ bgx;
- video_clear();
+ if (!CONFIG_IS_ENABLED(NO_FB_CLEAR))
+ video_clear();
#ifdef CONFIG_VIDEO_LOGO
/* Plot the logo and get start point of console */