>speaking of that : what is the simplest/safest solution to allow the use
>of direct access to the accel engine with the fb driver ?
>
>in my example, how can I make the use of glide safe with the fb driver on
>voodoo 1 ?
Their really is no way. What I did was just mmap the accel region and
framebuffer. Then pounded away on the mmio region. No DMA or anything like
that. It worked but fbdev wasn't designed with this in mind. Test to see
if a /dev/fb exist that uses the voodoo 1? You can create a while loop
that opens everything /dev/fbX and then do a ioctl for fb_fix_screeninfo.
Do a string compare with "Voodoo 1". If you get this then you can use a
fbdev interface. First you should lock the the VT to prevent VC switching.
Then place the keyboard in raw mode to read the keyboard. Also you will
need a way to deal with the VC switching back to the console. This
will require setting up signal handlers. Then it is safe to mmap the regions
and use /dev/fb. Pound away on the registers. Also make sure you use the
fbdev driver to set the mode instead of the glide library.
This is for 2.4.X at present. Now for ruby once I add the final
touches. Do a while loop to look for the "Voodoo 1" string as above. Then
open /dev/fb. By doing this it will automatically lock the VT for you. The
n open /dev/eventX to see which input devices you have. Use /dev/eventX
to get input events for various devices. Now if you want to VT switch to
another terminal it is just as easy. First if you want to save the screens
contents copy them to a allocated chunk of memory. Then unmap the
framebuffer and mmio regions. Close /dev/fb which will allow VT switching
and reset the console back to original state for the VC you are switching
to. Close all /dev/eventX. You are done. As you can see with this you can
make a really small and simple glide library. Same for X servers ;-)
MS: (n) 1. A debilitating and surprisingly widespread affliction that
renders the sufferer barely able to perform the simplest task. 2. A disease.
James Simmons [jsi...@li...] ____/|
fbdev/console/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U
http://linuxconsole.sourceforge.net
|