summaryrefslogtreecommitdiffstats
path: root/common/lcd_console.c
diff options
context:
space:
mode:
authorHannes Petermaier <hannes.petermaier@br-automation.com>2015-03-27 08:01:36 +0100
committerAnatolij Gustschin <agust@denx.de>2015-04-18 10:24:38 +0200
commita202c5bd24d68d640fcb0d6f43ff7f30ccc5780d (patch)
treef307f40c1ab9c00f4e7378fa205e5a3a03fc4ecf /common/lcd_console.c
parent97562c12f1fac25a272a7079e234b9157eeedce5 (diff)
downloadblackbird-obmc-uboot-a202c5bd24d68d640fcb0d6f43ff7f30ccc5780d.tar.gz
blackbird-obmc-uboot-a202c5bd24d68d640fcb0d6f43ff7f30ccc5780d.zip
common/lcd_console: ask only one-time for bg/fg-color per call
Don't call the lcd_getfgcolor and lcd_getbgcolor within the "draw-loop", this only wastes time. Signed-off-by: Hannes Petermaier <hannes.petermaier@br-automation.com> Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at> Acked-by: Nikita Kiryanov <nikita@compulab.co.il>
Diffstat (limited to 'common/lcd_console.c')
-rw-r--r--common/lcd_console.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/common/lcd_console.c b/common/lcd_console.c
index 243b7c5c99..b7dda7ad85 100644
--- a/common/lcd_console.c
+++ b/common/lcd_console.c
@@ -59,7 +59,8 @@ static void lcd_putc_xy(ushort x, ushort y, char c)
{
uchar *dest;
ushort row;
- int fg_color, bg_color;
+ int fg_color = lcd_getfgcolor();
+ int bg_color = lcd_getbgcolor();
int i;
dest = (uchar *)(lcd_console_address +
@@ -73,10 +74,6 @@ static void lcd_putc_xy(ushort x, ushort y, char c)
#else
uchar *d = dest;
#endif
-
- fg_color = lcd_getfgcolor();
- bg_color = lcd_getbgcolor();
-
uchar bits;
bits = video_fontdata[c * VIDEO_FONT_HEIGHT + row];
OpenPOWER on IntegriCloud