On Thu, May 13, 2010 at 6:15 PM, Welson Jr <welso...@gmail.com> wrote: > Hi All, > The device i´m trying to support does not have a framebuffer hardware, > instead there is a api in user land with two simple functions: > 1 - Allocate a memory buffer > 2 - Render this buffer to screen. > My device also have a fixed resolution of 640x480 and its using ARGB8888. > But even with this simple api i´m clueless about how to write a driver for > it. > So far i could understand that for my case the best system is DEVMEM and my > "driver" needs basically 3 parts: > 1 - A Directfb gxfdriver for this "device" implementing functions from > GraphicsDeviceFuncs and GraphicsDriverFuncs > 2 - A "Screen" implementing ScreenFuncs, > 3 - One or more "Layer" - implementing DisplayLayerFuncs > For 1: > - I´m not sure if a i have to implement the drawing functions like > FillRectangle or if there is a generic fallback because there is no hardware > acceleration.
There is of course a generic software fallback. > - i don't know how to map the memory allocated by this function so it > cam be used by dfb, its returns a pointer to memory like malloc does... I can suggest to look at http://www.mail-archive.com/directfb-dev@directfb.org/msg06851.html for an example of memory system which use malloc (similar to what you describe). > - i couldin´t find which fields my DeviceData and DriverData should > have. > And i´m completely in the dark with the 2 and 3, i couldin´d understand > which one is responsible for call my "Render" function all i could figure is > that my fixed resolution should be returned by the GetScreenSize() func in > "Screen". I appreciate if anyone could point me which functions are > mandatory for a implementing a basic Layer and Screen. > Sorry for my bad English, and thanks in advance, You can also have a look at http://git.potipota.net/cgi-bin/cgit.cgi/DirectFB-Lazy/ It's gfxdriver I've done to not use the x11 system. This gfxdriver also handles memory allocation inside mmapped files. It works with a visualizer http://git.potipota.net/cgi-bin/cgit.cgi/LazyVisu/ If you have more specifics questions than "I don't understand" I could probably help you more ;) Regards, -- Lionel Landwerlin _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev