From patchwork Sat Oct 18 11:13:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?S=C3=B6ren_Moch?= X-Patchwork-Id: 400678 X-Patchwork-Delegate: agust@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B427314009E for ; Sun, 19 Oct 2014 00:41:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6698D4B5F1; Sat, 18 Oct 2014 15:41:05 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9VOjidNv8b7U; Sat, 18 Oct 2014 15:41:05 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C4E1D4B5E4; Sat, 18 Oct 2014 15:41:04 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 603014B5F5 for ; Sat, 18 Oct 2014 13:19:44 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v0xvNIrYsqjJ for ; Sat, 18 Oct 2014 13:19:44 +0200 (CEST) X-Greylist: delayed 306 seconds by postgrey-1.32 at theia; Sat, 18 Oct 2014 13:19:40 CEST X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mout.web.de (mout.web.de [212.227.17.11]) by theia.denx.de (Postfix) with ESMTPS id 3C39A4B5F1 for ; Sat, 18 Oct 2014 13:19:40 +0200 (CEST) Received: from localhost.localdomain ([89.204.138.155]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0LjJPH-1YHnmw2vNf-00dUTl; Sat, 18 Oct 2014 13:14:33 +0200 From: Soeren Moch To: u-boot@lists.denx.de Date: Sat, 18 Oct 2014 13:13:54 +0200 Message-Id: <1413630834-3509-2-git-send-email-smoch@web.de> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1413630834-3509-1-git-send-email-smoch@web.de> References: <1413630834-3509-1-git-send-email-smoch@web.de> X-Provags-ID: V03:K0:qpTuwEXY4enN5fIQjmFEI3GZQb1XKrHVjQrTq4OSM/iIpM2hRbj mK9tgmAchxwE1SjoWC9pYGW+TWIHE9h5GPJYiRp4mDuX1vU9QUt+GO782cWyn9WAv5Cl503 X39zOoSckZdUgklmEPk7+81KsNHm0AMMB+bIHICafy4fyWvymzKEjVbAHVgDrQWdALzUZki 0Kc4KupvU81kQy1QiYF4w== X-UI-Out-Filterresults: notjunk:1; X-Mailman-Approved-At: Sat, 18 Oct 2014 15:41:04 +0200 Cc: Soeren Moch Subject: [U-Boot] [PATCH 2/2] video: speedup writing strings to fb console X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.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 --- 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); + } } /*