Re: Optimizing bitblit.c / fb_pad_*
flat view
From: Knut Petersen <hidden>
Date: 2005-07-30 18:42:16
Hi Antonino,
quoted
+ if (fast_8x16) + for (i = 16; i--; ) { + *dstp = src[15-i]; + dstp += pitch; + }why not make it to something like this? for (i = cellsize; i--;) { *dstp = src[cellsize-1-i]; dstp += pitch; } This way, it will work with any fontsize, as long as the width is a 8-bit size-aligned. You can do the same with fb_pad_aligned_buffer(), so the rest can benefit too.
fb_pad_unaligned() could be optimized localy, there are other cases of memcpy(), e.g. in softcursor, etc. Well, this was nothing but a quick ´n dirty hack, I tried to find out if there is still potential for optimizations. If people agree that the gain in speed justifies it, I will try to look at those parts of the kernel _after_ I have submitted my cyberblade/i1 driver. I have to admit that I ´m not familar (enough) with the layers above the hardware driver level right now.
PS: Next time you submit a patch, add a Signed-off-line.
ack. btw, should a new driver first be presented in linux-fbdev-devel@lists.sourceforge.net or lkml? cu, Knut ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click