public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Soeren Moch <smoch@web.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] video: speedup writing strings to fb console
Date: Sat, 18 Oct 2014 13:13:54 +0200	[thread overview]
Message-ID: <1413630834-3509-2-git-send-email-smoch@web.de> (raw)
In-Reply-To: <1413630834-3509-1-git-send-email-smoch@web.de>

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>
---
 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);
+	}
 }
 
 /*
-- 
1.9.1

  reply	other threads:[~2014-10-18 11:13 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-18 11:13 [U-Boot] [PATCH 1/2] arm: mx6: add support for TBS2910 Matrix ARM miniPC Soeren Moch
2014-10-18 11:13 ` Soeren Moch [this message]
2014-10-21 11:40 ` Stefano Babic
2014-10-21 17:54   ` Soeren Moch
2014-10-22  8:36     ` Stefano Babic
2014-10-22 12:16       ` Soeren Moch
2014-10-22 14:23         ` Stefano Babic
2014-10-24 14:33 ` [U-Boot] [PATCH v2 1/3] arm: arch-mx6: typo fixes in crm_regs.h Soeren Moch
2014-10-24 14:33   ` [U-Boot] [PATCH v2 2/3] arm: mx6: add support for TBS2910 Matrix ARM miniPC Soeren Moch
2014-10-30 11:02     ` Stefano Babic
2014-10-30 13:26       ` [U-Boot] [PATCH v3] " Soeren Moch
2014-11-03  9:37         ` Stefano Babic
2014-11-03 10:39           ` Soeren Moch
2014-11-03 10:54             ` Stefano Babic
2014-11-03 11:27               ` Fabio Estevam
2014-11-03 12:57           ` [U-Boot] [PATCH v4] " Soeren Moch
2014-11-13 17:10             ` Stefano Babic
2014-10-30 12:59     ` [U-Boot] [PATCH v2 2/3] " Fabio Estevam
2014-10-24 14:33   ` [U-Boot] [PATCH v2 3/3] video: speedup writing strings to fb console Soeren Moch
2014-10-30 10:52     ` Stefano Babic
2014-10-30 21:06     ` Anatolij Gustschin
2014-10-30 11:00   ` [U-Boot] [PATCH v2 1/3] arm: arch-mx6: typo fixes in crm_regs.h Stefano Babic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1413630834-3509-2-git-send-email-smoch@web.de \
    --to=smoch@web.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox