diff options
author | Soeren Moch <smoch@web.de> | 2014-10-24 16:33:30 +0200 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2014-10-30 21:45:25 +0100 |
commit | d37e96ecb9886714e0b5e167a91404cde8351b19 (patch) | |
tree | 7167d4347f996465c529cd757612ad110cc2d455 /drivers | |
parent | 571bdf16a78e9e116a93d46f4809c4f8a3f2adb6 (diff) | |
download | u-boot-imx-d37e96ecb9886714e0b5e167a91404cde8351b19.zip u-boot-imx-d37e96ecb9886714e0b5e167a91404cde8351b19.tar.gz u-boot-imx-d37e96ecb9886714e0b5e167a91404cde8351b19.tar.bz2 |
video: speedup writing strings to fb console
With enabled framebuffer console the printenv command can take several
seconds to complete. This patch temporarily disables cache flush when
writing strings to fb console. Then there is no noticable delay anymore.
Tested with imx6 hdmi framebuffer.
Signed-off-by: Soeren Moch <smoch@web.de>
Acked-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/cfb_console.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 6aa50cb..a347e13 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1160,10 +1160,19 @@ static void video_putc(struct stdio_dev *dev, const char c) static void video_puts(struct stdio_dev *dev, const char *s) { + int flush = cfb_do_flush_cache; int count = strlen(s); + /* temporarily disable cache flush */ + cfb_do_flush_cache = 0; + while (count--) video_putc(dev, *s++); + + if (flush) { + cfb_do_flush_cache = flush; + flush_cache(VIDEO_FB_ADRS, VIDEO_SIZE); + } } /* |