All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 16/17] lcd: Add CONSOLE_SCROLL_LINES option to speed console
Date: Sat, 14 Jan 2012 16:47:28 -0800	[thread overview]
Message-ID: <1326588449-1794-17-git-send-email-sjg@chromium.org> (raw)
In-Reply-To: <1326588449-1794-1-git-send-email-sjg@chromium.org>

When the cursor position gets to the end of the LCD console we normally
scroll by one line. This adds an option to increase that value.

Console scrolling is often slow, and if a large amount of output is
being sent, increasing this option to 10 or so will speed things up
considerably.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 README       |    6 ++++++
 common/lcd.c |   16 +++++++++++++---
 2 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/README b/README
index d0b891f..c2f6699 100644
--- a/README
+++ b/README
@@ -1389,6 +1389,12 @@ The following options need to be configured:
 		to change data cache settings on a per-section basis (such as
 		ARM). Only enabled on ARM at present.
 
+		CONSOLE_SCROLL_LINES
+
+		When the console need to be scrolled, this is the number of
+		lines to scroll by. It defaults to 1. Increasing this makes
+		the console jump but can help speed up operation when scrolling
+		is slow.
 
 - Splash Screen Support: CONFIG_SPLASH_SCREEN
 
diff --git a/common/lcd.c b/common/lcd.c
index 707f785..b6da10e 100644
--- a/common/lcd.c
+++ b/common/lcd.c
@@ -130,12 +130,23 @@ void lcd_set_flush_dcache(int flush)
 
 static void console_scrollup (void)
 {
+	int rows = 1;
+
+#ifdef CONSOLE_SCROLL_LINES
+	rows = CONSOLE_SCROLL_LINES;
+#endif
 	/* Copy up rows ignoring the first one */
-	memcpy (CONSOLE_ROW_FIRST, CONSOLE_ROW_SECOND, CONSOLE_SCROLL_SIZE);
+	memcpy(CONSOLE_ROW_FIRST,
+	       lcd_console_address + CONSOLE_ROW_SIZE * rows,
+	       CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows);
 
 	/* Clear the last one */
-	memset (CONSOLE_ROW_LAST, COLOR_MASK(lcd_color_bg), CONSOLE_ROW_SIZE);
+	memset(lcd_console_address + CONSOLE_SIZE - CONSOLE_ROW_SIZE * rows,
+		COLOR_MASK(lcd_color_bg),
+	       CONSOLE_ROW_SIZE * rows);
+
 	lcd_sync();
+	console_row -= rows;
 }
 
 /*----------------------------------------------------------------------*/
@@ -165,7 +176,6 @@ static inline void console_newline (void)
 	if (console_row >= CONSOLE_ROWS) {
 		/* Scroll everything up */
 		console_scrollup () ;
-		--console_row;
 	}
 }
 
-- 
1.7.7.3

  parent reply	other threads:[~2012-01-15  0:47 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-15  0:47 [U-Boot] [PATCH 0/17] tegra: Add display driver and LCD support for Seaboard Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 04/17] tegra: Add display support to funcmux Simon Glass
2012-01-15  1:36   ` Mike Frysinger
2012-06-13 12:15     ` Simon Glass
     [not found] ` <1326588449-1794-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-01-15  0:47   ` [PATCH 01/17] fdt: Add function to look up a phandle's register address Simon Glass
2012-01-15  0:47     ` [U-Boot] " Simon Glass
2012-01-15  0:47   ` [PATCH 02/17] fdt: Add header guard to fdtdec.h Simon Glass
2012-01-15  0:47     ` [U-Boot] " Simon Glass
2012-01-15  0:47   ` [PATCH 03/17] fdt: Correct GPIO name access in fdtdec Simon Glass
2012-01-15  0:47     ` [U-Boot] " Simon Glass
2012-01-15  0:47   ` [PATCH 05/17] tegra: fdt: Add LCD definitions for Tegra Simon Glass
2012-01-15  0:47     ` [U-Boot] " Simon Glass
2012-01-15  0:47   ` [PATCH 15/17] tegra: fdt: Add LCD definitions for Seaboard Simon Glass
2012-01-15  0:47     ` [U-Boot] " Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 06/17] tegra: Add support for PWFM Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 07/17] tegra: Add SOC support for display/lcd Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 08/17] tegra: Add LCD driver Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 09/17] tegra: Add LCD support to Nvidia boards Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 10/17] arm: Add control over cachability of memory regions Simon Glass
2012-02-10 20:38   ` Albert ARIBAUD
2012-03-04  6:20     ` Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 11/17] lcd: Add CONFIG_ALIGN_LCD_TO_SECTION to align lcd for MMU Simon Glass
2012-01-15  1:38   ` Mike Frysinger
2012-06-13 12:23     ` Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 12/17] lcd: Add support for flushing LCD fb from dcache after update Simon Glass
2012-01-15  1:42   ` Mike Frysinger
2012-01-15  1:57     ` Simon Glass
2012-01-15  2:16       ` Mike Frysinger
2012-06-13 12:25         ` Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 13/17] tegra: Align LCD frame buffer to section boundary Simon Glass
2012-01-15  0:47 ` [U-Boot] [PATCH 14/17] tegra: Support control of cache settings for LCD Simon Glass
2012-01-15  0:47 ` Simon Glass [this message]
2012-01-15  0:47 ` [U-Boot] [PATCH 17/17] tegra: Enable display/lcd support on Seaboard Simon Glass
2012-04-19 12:41 ` [U-Boot] [PATCH 0/17] tegra: Add display driver and LCD support for Seaboard Christian Kroehnert
2012-07-14  8:03   ` Simon Glass
2012-07-17 16:11     ` Thierry Reding
2012-07-18  6:51       ` Simon Glass
2012-07-19 12:01         ` Christian Kroehnert
2012-07-24 19:16         ` Stephen Warren

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=1326588449-1794-17-git-send-email-sjg@chromium.org \
    --to=sjg@chromium.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.