diff options
author | Eric Nelson <eric.nelson@boundarydevices.com> | 2013-05-06 14:27:28 +0200 |
---|---|---|
committer | Robert Winkler <robert.winkler@boundarydevices.com> | 2013-06-17 13:15:43 -0700 |
commit | dafa73421665e5c9fb824d7ef3150a37b42140e5 (patch) | |
tree | c8342b7ee338022adbaa991f6e320b22fcc09c55 | |
parent | 8ed84cc9a7418ba8cbed60f5595b8bd93521bcda (diff) |
cfb_console: flush FB cache at end of public functions
Removed internal cache_flush operations and placed a flush of the
entire frame-buffer at the end of each public function.
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
-rw-r--r-- | drivers/video/cfb_console.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 0793f07f242..b10f1590ba0 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -572,8 +572,6 @@ static void video_drawchars(int xx, int yy, unsigned char *s, int count) SWAP32((video_font_draw_table32 [bits & 15][3] & eorx) ^ bgx); } - if (cfb_do_flush_cache) - flush_cache((ulong)dest0, 32); dest0 += VIDEO_FONT_WIDTH * VIDEO_PIXEL_SIZE; s++; } @@ -642,8 +640,6 @@ static void video_invertchar(int xx, int yy) for (x = firstx; x < lastx; x++) { u8 *dest = (u8 *)(video_fb_address) + x + y; *dest = ~*dest; - if (cfb_do_flush_cache) - flush_cache((ulong)dest, 4); } } } @@ -687,6 +683,8 @@ void console_cursor(int state) } cursor_state = state; } + if (cfb_do_flush_cache) + flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); } #endif @@ -739,8 +737,6 @@ static void console_clear_line(int line, int begin, int end) memsetl(offset + i * VIDEO_LINE_LEN, size, bgx); } #endif - if (cfb_do_flush_cache) - flush_cache((ulong)CONSOLE_ROW_FIRST, CONSOLE_SIZE); } static void console_scrollup(void) @@ -1146,6 +1142,8 @@ void video_putc(const char c) #else parse_putc(c); #endif + if (cfb_do_flush_cache) + flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); } void video_puts(const char *s) @@ -1799,6 +1797,8 @@ int video_display_bitmap(ulong bmp_image, int x, int y) } #endif + if (cfb_do_flush_cache) + flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); return (0); } #endif @@ -2209,6 +2209,9 @@ static int video_init(void) console_col = 0; console_row = 0; + if (cfb_do_flush_cache) + flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); + return 0; } |