From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Thu, 30 Oct 2014 11:52:04 +0100 Subject: [U-Boot] [PATCH v2 3/3] video: speedup writing strings to fb console In-Reply-To: <1414161210-3702-3-git-send-email-smoch@web.de> References: <1413630834-3509-1-git-send-email-smoch@web.de> <1414161210-3702-1-git-send-email-smoch@web.de> <1414161210-3702-3-git-send-email-smoch@web.de> Message-ID: <54521854.1090802@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 24/10/2014 16:33, Soeren Moch wrote: > 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 > --- > Cc: Stefano Babic > --- > drivers/video/cfb_console.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c > index 9231927..e7548e1 100644 > --- a/drivers/video/cfb_console.c > +++ b/drivers/video/cfb_console.c > @@ -1160,10 +1160,19 @@ void video_putc(struct stdio_dev *dev, const char c) > > 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); > + } > } Sure it makes sense that the video is updated only once. Acked-by: Stefano Babic Best regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================