|
From: antirez <an...@in...> - 2001-05-14 09:32:46
|
On Mon, May 14, 2001 at 08:33:00AM +0200, Geert Uytterhoeven wrote: > On Sat, 12 May 2001, antirez wrote: > > you can download the quite useless vga256fb device driver > > at http://www.kyuzz.org/antirez/vga256fb.html. > > > > I used it for an embedded project, than I added the "tweaked" > > VGA modes for fun, with a software hack. > > While useless, to run at 360x480 in 256 colors with a standard > > VGA card can be funny ;) > > > > As you can guess, this driver will waste your CPU and RAM > > when in linear emulation mode. > > Would it be useful to integrate vga16fb and vga256fb? Yes, why to split in two drivers modes supported by the same hardware? I did vga256fb as a stand-alone driver since: 1) It was a real-world work, the timeline was very short, and vga16 was not trivial to modify for a 256 color mode. 2) vga16fb is a FB_TYPE_VGAPLANES, but vga256fb is a FB_TYPE_PACKED_PIXELS driver. 3) vga256fb is "mode oriented", while vga16fb converts arbitrary xres, yres values to hardware settings. I'm not sure it's possible to do it for 256 colors tweaked modes. The big difference that should be merged is that while vga16 really converts 'var' to hardware settings, vga256 searches for a video mode in a table of predefined modes that matches the 'var' xres, yres elements. > Perhaps defaulting to 640x480 in 16 colors to avoid linear emulation mode? It avoids the linear emulation mode anyway at startup. The default mode is the 320x200 in 256 colors, that's a linear mode so the emulation and memory are not needed. Both the memory and the timer to perform the linear emulation are allocated once the user select an unchained mode the first time. While the linear emulation task is stopped once you return to a linear mode, the memory will never be freed (it may be in use by another console, also vmalloc()/vfree() 360*480 bytes every time a user enter/leave a unchained mode seems bad). btw, you can specify "notweaked" as kernel option to disable the unchained modes (the modes that can't work without linear emu). This leaves only two modes: 320x200 and 256x256, but doesn't require any CPU time or additional memory. > Do you think the linear emulation mode will work on non-ia32 as well? I can't see any problem with this, but I can't test it for lacks of hardware. Of course, if vga256fb can be useful for some linux user, to put it in the mainstream kernel source is the only way to take it up to date. regards, Salvatore -- Salvatore Sanfilippo <an...@in...> http://www.kyuzz.org/antirez finger an...@te... for PGP key 28 52 F5 4A 49 65 34 29 - 1D 1B F6 DA 24 C7 12 BF |