[U-Boot] [PATCH] cfb_console: flush FB cache at end of public functions
Eric Nelson
eric.nelson at boundarydevices.com
Sun Sep 23 01:29:38 CEST 2012
Removed internal cache_flush operations and placed a flush of the
entire frame-buffer at the end of each public function.
Changed logo_plot() to static because it isn't called externally or
declared in a header.
Signed-off-by: Eric Nelson <eric.nelson at boundarydevices.com>
---
drivers/video/cfb_console.c | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c
index 19d061f..1372353 100644
--- a/drivers/video/cfb_console.c
+++ b/drivers/video/cfb_console.c
@@ -557,8 +557,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++;
}
@@ -627,8 +625,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);
}
}
}
@@ -672,6 +668,8 @@ void console_cursor(int state)
}
cursor_state = state;
}
+ if (cfb_do_flush_cache)
+ flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
}
#endif
@@ -724,8 +722,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)
@@ -828,6 +824,8 @@ void video_putc(const char c)
}
}
CURSOR_SET;
+ if (cfb_do_flush_cache)
+ flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
}
void video_puts(const char *s)
@@ -1474,13 +1472,15 @@ 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
#ifdef CONFIG_VIDEO_LOGO
-void logo_plot(void *screen, int width, int x, int y)
+static void logo_plot(void *screen, int width, int x, int y)
{
int xcount, i;
@@ -1862,6 +1862,8 @@ int drv_video_init(void)
if (stdio_register(&console_dev) != 0)
return 0;
+ if (cfb_do_flush_cache)
+ flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE);
/* Return success */
return 1;
}
--
1.7.9
More information about the U-Boot
mailing list