From: Antonino Daplas <adaplas@pol.net>
To: Antonino Daplas <adaplas@pol.net>
Cc: James Simmons <jsimmons@infradead.org>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Linux Fbdev development list
<linux-fbdev-devel@lists.sourceforge.net>
Subject: Re: [PATCH]: More optimization for accel_putcs()
Date: 23 Feb 2003 19:07:47 +0800 [thread overview]
Message-ID: <1045998151.1188.2.camel@localhost.localdomain> (raw)
In-Reply-To: <1045884656.1188.7.camel@localhost.localdomain>
On Sat, 2003-02-22 at 11:32, Antonino Daplas wrote:
> Geert, James,
>
> Here's a patch for linux-2.5.61 + James' fbdev.diff so accel_putcs()
> will do only 1 fb_imageblit() at the end when fontwidth is not divisible
> by 8. Tested on 4x6 and 12x22 fonts. There should be a significant
> performance increase even with the generic functions, however, the
> greatest gain can be seen on drivers with accelerated fb_imageblit().
> Here are some numbers:
>
The optimization logic is flawed :-( Please apply this patch also.
Tony
diff -Naur linux-2.5.61-fbdev/drivers/video/console/fbcon.c linux-2.5.61/drivers/video/console/fbcon.c
--- linux-2.5.61-fbdev/drivers/video/console/fbcon.c 2003-02-23 18:54:32.000000000 +0800
+++ linux-2.5.61/drivers/video/console/fbcon.c 2003-02-23 18:58:05.000000000 +0800
@@ -400,7 +400,7 @@
image.width = vc->vc_font.width * cnt;
pitch = (image.width + 7)/8;
while (k--) {
- src = p->fontdata + (scr_readw(s++)&charmask)*
+ src = p->fontdata + (scr_readw(s++)&charmask)*
cellsize;
dst = dst0;
mask = (u8) (0xfff << shift_high);
@@ -412,15 +412,18 @@
src++;
}
dst[idx] &= mask;
- dst[idx] |= *src++ >> shift_low;
+ dst[idx] |= *src >> shift_low;
+ if (shift_high < mod)
+ dst[idx+1] = *src << shift_high;
+ src++;
dst += pitch;
}
shift_low += mod;
+ dst0 += (shift_low >= 8) ? width : width - 1;
shift_low &= 7;
shift_high = 8 - shift_low;
- dst0 += (shift_low) ? width - 1 : width;
}
-
+
info->fbops->fb_imageblit(info, &image);
image.dx += cnt * vc->vc_font.width;
count -= cnt;
-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
next prev parent reply other threads:[~2003-02-23 11:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-22 3:32 [PATCH]: More optimization for accel_putcs() Antonino Daplas
2003-02-23 11:07 ` Antonino Daplas [this message]
2003-02-26 19:29 ` James Simmons
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=1045998151.1188.2.camel@localhost.localdomain \
--to=adaplas@pol.net \
--cc=geert@linux-m68k.org \
--cc=jsimmons@infradead.org \
--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).