]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: speedup writing strings to fb console
authorSoeren Moch <smoch@web.de>
Fri, 24 Oct 2014 14:33:30 +0000 (16:33 +0200)
committerAnatolij Gustschin <agust@denx.de>
Thu, 30 Oct 2014 20:45:25 +0000 (21:45 +0100)
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>
drivers/video/cfb_console.c

index 6aa50cb4f966c70d3495ea5588db8b42bb40bcd7..a347e13d7de8fa5fc360524a76afdd85c70cb26e 100644 (file)
@@ -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);
+       }
 }
 
 /*