From: James S. <jsi...@ac...> - 2000-05-31 18:37:52
|
> > > length = (xres_virtual+bpp-1)/bpp; > It is obviously wrong... For xres = 640 at 16bpp you should get > 1280 bytes and for 8bpp 640 bytes... Dah!! I don't know what I was thinking. I was just trying to figure what the orginal code was doing. Which I stil can't figure it out yet. Petr do you have a idea what Geert was thinking when he wrote that routine? > > Length is the value that placed in fb_fix-screeninfo line_length which is > > the number of bytes wide the way th card sees a scanline. Take a voodoo > > card for example. No matter what mode you set the card in line_length is > > 1024. So take for example 800x600. We have video memory layed out like > > this: > Then easiest thing is that driver will always report xres_virtual = 1024. > Or it can compute line_length as it wants, but for such hardware then > get_line_length() should not depend on xres_virtual. Right, you wouldn't need a get_line_length routine. Q: Why did they deprecate a.out support in linux? A: Because a nasty coff is bad for your elf. James Simmons [jsi...@li...] ____/| fbdev/console/gfx developer \ o.O| http://www.linux-fbdev.org =(_)= http://linuxgfx.sourceforge.net U http://linuxconsole.sourceforge.net |