From: Soeren Moch Date: Fri, 24 Oct 2014 14:33:30 +0000 (+0200) Subject: video: speedup writing strings to fb console X-Git-Tag: v2015.01-rc2~78^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d37e96ecb9886714e0b5e167a91404cde8351b19;p=platform%2Fkernel%2Fu-boot.git 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 Acked-by: Stefano Babic --- 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); + } } /*