On Tue, 10 Apr 2001, Brian S. Julin wrote:
> What we could possibly do is find a way to link the DirectFB
> hardware support objects into display-fbdev to use their hardware
> support code.  That way we'd use LibGGI/LibGalloc/LibBlit to set
> up the resource in a manner understood by the DirectFB hw functions,
> and then call those functions to render.  I'll look into that a 
> little more tonight, to see if it is a viable prospect.

OK, this does look doable.  The DirectFB drivers use a relatively
well modularized approach, and they rely on generic fbdev code in
libdirectfb to do the modeset. This is the API which they have in 
the driver .o files:

int driver_probe( int fd, GfxCard *card )

...this just does a switch statement on the /etc/fb.h FB_ACCEL value
and fills in some things in the GfxCard structure.

int driver_init( int fd, GfxCard *card )

...this just MMAPS the accel region, and fills in more stuff in 
GfxCard, including the following function hooks:

CheckState (sees if the accel is idle)
EngineSync (waits for accel idle.)
FillRectangle, DrawRectangle, DrawLine, Blit, StretchBlit

void driver_init_layers()
...not implemented in any driver yet.

void driver_deinit()
...prints some performance monitoring stuff, unmaps accel, and exits.

The driver module is in a couple of parts, but between them the only
symbols they are missing are from libc, and one called "config" which
is just a structure with global configuration settings.  There are some 
globals in the driver and one matrox-specific setting in "config" which 
I suppose might be a bit icky when dealing with multiple cards, but nothing
in the way of single-card use.

Unfortunately, the only card I have which may be supported is 
my Mystique, which is on a SoG monitor on an old P-60... not the
best devel environment (and the drivers are for G200/G400, not 1064).

I'm also not an ld wizard.  Anyone who is, and owns a rage128, 
Neomagic 2200/2230/2360/2380 or a Matrox G200/G400 may wish to beat me
to it.  There is also disabled code in there for Banshee.

--
Brian

Reply via email to