On Sun, Aug 14, 2005 at 04:28:38PM +0800, Áõº£Ïè wrote: > Hi all developers, > > Now I want to port DirectFB to ST chip platform and framebuffer > already worked now. Today I downloaded the DirectFB core source code and > want to add support on my chip. And I have some questions on it because > I can not find any material on how to programing DirectFB Graphic > devices.
There are no docs on it but I think the code is quite clear. > 1. I think the chip graphic device driver should be under > DirectFB-0.9.22/gfxdrivers. Is there any standard API interface for the > graphic device driver to do some hardware accelarate operation? > > I noticed there are driver_init_driver, driver_init_device, > driver_close_device and driver_close_driver in all graphic drivers. Also driver_probe() and driver_get_info(). driver_*_driver() will be called for each instance of the driver. driver_*_device() will be called for the first instance only. > It > seemed the interface API between graphic devices and DirectFB graphic. > And I found one data structure contains the all function pointers to do > hardware accelator operation. Is it right? Yes. driver_init_driver() sets the GraphicsDeviceFuncs function pointers and driver_init_device() fills in GraphicsDeviceInfo. driver_get_info() fills in GraphicsDriverInfo. > > 2. How does DirectFB know which graphic device should be called? DirectFB loads each gfxdriver and calls driver_probe(). The first driver to return 1 will be used. > From the architecture document, I need to add new device supported > in configure file. I noticed in DirectFB-0.9.22/configure.in there are > graphic driver supported list. So is it enough for me to add my chip in > this file? You must add your driver to configure.in and gfxdrivers/Makefile.am. And of course you need a Makefile.am inside your driver's source directory. -- Ville Syrjälä [EMAIL PROTECTED] http://www.sci.fi/~syrjala/ _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev