linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: [PATCH] smart blitter usage for scrolling	(cleaned)
Date: Sat, 12 May 2007 03:41:56 +0800	[thread overview]
Message-ID: <1178912517.5017.3.camel@daplas> (raw)
In-Reply-To: <4644106cacb67@wp.pl>

On Fri, 2007-05-11 at 08:42 +0200, Krzysztof Helt wrote:
> From: Krzysztof Helt <krzysztof.h1@wp.pl>
> 
> This patch replaces the current SCROLL_MOVE method with smarter
> method using the same logic as the SCROLL_REDRAW method. This
> brings these two methods much closer in performance and benefits
> all framebuffers which uses the SCROLL_MOVE method.
> 
> Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
> 
> ---
> 
> This version does not merge blits and does not uses ifdefs. The
> patch was diffed against linux-2.6.21-git11
> 
> Regards,
> Krzysztof
> 
> diff -urp linux-2.6.21.orig/drivers/video/console/fbcon.c
> linux-2.6.21/drivers/video/console/fbcon.c
> --- linux-2.6.21.orig/drivers/video/console/fbcon.c	2007-05-09
> 16:56:07.936744076 +0200
> +++ linux-2.6.21/drivers/video/console/fbcon.c	2007-05-10
> 21:00:22.685633709 +0200
> @@ -1704,6 +1704,61 @@ static void fbcon_redraw_move(struct vc_
>  	}
>  }
>  
> +static void fbcon_redraw_blit(struct vc_data *vc, struct fb_info
> *info,
> +			struct display *p, int line, int count, int ycount)
> +{
> +	int offset = ycount * vc->vc_cols;
> +	unsigned short *d = (unsigned short *)
> +	    (vc->vc_origin + vc->vc_size_row * line);
> +	unsigned short *s = d + offset;
> +	struct fbcon_ops *ops = info->fbcon_par;
> +
> +	while (count--) {
> +		unsigned short *start = s;
> +		unsigned short *le = advance_row(s, 1);
> +		unsigned short c;
> +		int x = 0;
> +		unsigned short attr = 1;
> +
> +		do {
> +			c = scr_readw(s);

#####
> +			if (attr != (c & 0xff00)) {
> +				attr = c & 0xff00;
> +				if (s > start) {
> +					ops->bmove(vc, info, line + ycount, x, line, x, 1, s-start);
> +					x += s - start;
> +					start = s;
> +				}
> +			}
#####

The code block above is probably not needed. It just checks if the
attribute of the character (ie the color) has changed.  This is required
for putcs, but is unnecessary for bmove.

Tony



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

  reply	other threads:[~2007-05-11 19:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-11  6:42 [PATCH] smart blitter usage for scrolling (cleaned) Krzysztof Helt
2007-05-11 19:41 ` Antonino A. Daplas [this message]
2007-05-12  6:06   ` [PATCH] smart blitter usage for scrolling(cleaned) Krzysztof Helt

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=1178912517.5017.3.camel@daplas \
    --to=adaplas@gmail.com \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /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;
as well as URLs for NNTP newsgroup(s).