From: Dave H. <dhy...@gm...> - 2006-01-12 15:21:14
|
Hi Holly, > I haven't gotten around to trying this out yet. Do you remember if there > is a simple way to set up a shadow framebuffer? Is is just as easy as > doing some kind of mknod in /dev (but then how do you get the fb memory > allocated and linked to /dev/fb1 or whatever)? We are using the linux > command line to start pxafb with parameters; do you know of some way to > start two fb devices in that manner? The actual shadow buffer itself is just a hunk of allocated memory that can then be mmap'd into userspace. Then there's a whole wack of infrastructure that you need if you want to make this look like a framebuffer to X-Windows. If you don't care about X-Windows compatability, then it's pretty simple. The very first framebuffer I wrote for microwindows didn't have any X-Windows compatability. Doing the mknod basically just provides a mapping from a symbolic name (like fb1) to a major number. There isn't any particular reason why fb1 and fb0 have to be mapped to the same major number or the same driver. Drivers can be loaded whether a /dev entry exists or not, and /dev entries can exist even when there is no driver. The /dev entries are really just a fancy lookup table. Using devfs allows a driver to advertise itself and you don't need to do a mknod, but that's really more of a convenience/management thing. If you made the second framebuffer a loadable module, then you could provide command line options at load time (through a startup script), or you could configure it to use kernel command line parameters, or you can use /proc entries (or maybe you don't even have any command line options). It's pretty arbitrary if you're writing the driver :) -- Dave Hylands Vancouver, BC, Canada http://www.DaveHylands.com/ |