Subject: Re: performace of console display
To: <>
From: Mattias Sandstrom <mattias@beauty.se>
List: port-mac68k
Date: 11/06/2002 17:39:42
Mattias Sandstrom wrote:
> anyway, to the point: i'd like to know if anybody has any idea why this
> might be? is it the frame buffer code, the font handling, the terminal
> emulation, or something else? i have a dark past in games programming,
> so i know a lot about graphics performance and asm optimizations of
> graphics code, and i'd really like to help out doing something about this.

seems like the macfb code is far from perfect. for example:

void
macfb_clear(dc)
	struct macfb_devconfig *dc;
{
	int i, rows;

	/* clear the display */
	rows = dc->dc_ht;
	for (i = 0; rows-- > 0; i += dc->dc_rowbytes)
		memset((u_char *)dc->dc_vaddr + dc->dc_offset + i,
		    0, dc->dc_rowbytes);
}

this would make sense if the last argument to memset had been 
(dc->dc_width * dc->dc_bpp / 8) or similar. as it is now an equivalent 
piece of code to that entire function, with much less overhead is:

memset((u_char*)dc->dc_vaddr+dc->dc_offset,0,dc->dc_rowbytes*dc->dc_ht);

i think i'll just keep working on it. i'm not tracking current, but it 
doesn't seem like macfb has gone through many changes in a while, so it 
shouldn't matter, right?

	/matt