public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 15/16] lcd: Add CONSOLE_SCROLL_LINES option to speed console
Date: Fri, 28 Sep 2012 16:51:44 +0200	[thread overview]
Message-ID: <1348843904.1432.46.camel@tellur> (raw)
In-Reply-To: <1348793077-10126-16-git-send-email-sjg@chromium.org>

Am Donnerstag, den 27.09.2012, 17:44 -0700 schrieb Simon Glass:
> 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>
> ---
> Changes in v3:
> - Fix tiny bug in mult-line lcd scrolling
> 
> Changes in v4:
> - Use CONFIG_CONSOLE_SCROLL_LINES instead of CONSOLE_SCROLL_LINES
> - Put default CONFIG_CONSOLE_SCROLL_LINES at top of file
> 
>  README       |    6 ++++++
>  common/lcd.c |   18 +++++++++++++++---
>  2 files changed, 21 insertions(+), 3 deletions(-)
> 
> diff --git a/README b/README
> index 1d0ce50..14b1f83 100644
> --- a/README
> +++ b/README
> @@ -1449,6 +1449,12 @@ The following options need to be configured:
>  		here, since it is cheaper to change data cache settings on
>  		a per-section basis.
>  
> +		CONFIG_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 74fa3f9..460f0ca 100644
> --- a/common/lcd.c
> +++ b/common/lcd.c
> @@ -76,6 +76,11 @@
>  #define CONFIG_LCD_ALIGNMENT PAGE_SIZE
>  #endif
>  
> +/* By default we scroll by a single line */
> +#ifndef CONFIG_CONSOLE_SCROLL_LINES
> +#define CONFIG_CONSOLE_SCROLL_LINES 1
> +#endif
> +
>  DECLARE_GLOBAL_DATA_PTR;
>  
>  ulong lcd_setmem (ulong addr);
> @@ -131,12 +136,20 @@ void lcd_set_flush_dcache(int flush)
>  
>  static void console_scrollup(void)
>  {
> +	const int rows = CONFIG_CONSOLE_SCROLL_LINES;
> +
>  	/* Copy up rows ignoring the first one */
Comment is inaccurate as you possibly ignore more than the first line.

> -	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 */
Same as above.

> -	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 +178,6 @@ static inline void console_newline(void)
>  	if (console_row >= CONSOLE_ROWS) {
>  		/* Scroll everything up */
>  		console_scrollup();
> -		--console_row;
>  	} else {
>  		lcd_sync();
>  	}

  reply	other threads:[~2012-09-28 14:51 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-28  0:44 [U-Boot] [PATCH v4 0/16] tegra: Add display driver and LCD support for Seaboard Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 01/16] tegra: Use const for pinmux_config_pingroup/table() Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 02/16] tegra: Add display support to funcmux Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 03/16] tegra: fdt: Add pwm binding and node Simon Glass
2012-09-28 20:08   ` Thierry Reding
2012-10-08 21:22     ` Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 04/16] tegra: fdt: Add LCD definitions for Tegra Simon Glass
2012-10-03 22:54   ` Stephen Warren
2012-10-03 22:58   ` Stephen Warren
2012-10-08 20:01     ` Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 05/16] tegra: Add support for PWM Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 06/16] tegra: Add SOC support for display/lcd Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 07/16] tegra: Add LCD driver Simon Glass
2012-10-05 14:21   ` Marc Dietrich
2012-10-08 22:02     ` Simon Glass
2012-10-08 22:12       ` Stephen Warren
2012-09-28  0:44 ` [U-Boot] [PATCH v4 08/16] tegra: Add LCD support to Nvidia boards Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 09/16] arm: Add control over cachability of memory regions Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 10/16] lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignment Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 11/16] lcd: Add support for flushing LCD fb from dcache after update Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 12/16] tegra: Align LCD frame buffer to section boundary Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 13/16] tegra: Support control of cache settings for LCD Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 14/16] tegra: fdt: Add LCD definitions for Seaboard Simon Glass
2012-10-03 22:58   ` Stephen Warren
2012-10-08 20:06     ` Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 15/16] lcd: Add CONSOLE_SCROLL_LINES option to speed console Simon Glass
2012-09-28 14:51   ` Lucas Stach [this message]
2012-10-08 19:55     ` Simon Glass
2012-09-28  0:44 ` [U-Boot] [PATCH v4 16/16] tegra: Enable display/lcd support on Seaboard Simon Glass
2012-10-03 17:05 ` [U-Boot] [PATCH v4 0/16] tegra: Add display driver and LCD support for Seaboard Stephen Warren
2012-10-03 17:22   ` Stephen Warren
2012-10-03 20:56   ` Simon Glass
2012-10-05 19:51   ` Stephen Warren
2012-10-08 20:06     ` Simon Glass
2012-10-08 20:26       ` Tom Warren
2012-10-08 21:30       ` Stephen Warren
2012-10-08 21:50         ` Simon Glass
2012-10-08 22:38           ` Stephen Warren
2012-10-03 23:00 ` Stephen Warren
2012-10-04  0:19   ` Simon Glass

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=1348843904.1432.46.camel@tellur \
    --to=dev@lynxeye.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