|
From: Antonino D. <ad...@po...> - 2003-02-23 11:07:25
|
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;
|