MOL voodoo1/2 support

mol-devel@lists.maconlinux.org mol-devel@lists.maconlinux.org
Mon, 2 Sep 2002 13:14:50 +0200


On Sun, Sep 01, 2002 at 05:32:24PM +0200, cjw wrote:
> On Tue, 27 Aug 2002 samuel@ibrium.se wrote:
> 
> > iii) Write a generic mac side MOL driver for video acceleration.
> > It is a bit difficult to obtain information from Apple how to
> > write an accelerated video driver though (and I believe there
> > is a NDA involved too).
> 
> For 2D accelleration I'd think you just override the low-level QuickDraw
> functions. MacOS has API calls for that. When MOL is running in X we can
> then just pass the info to X and the linux accellerated video driver
> should pick it up. 

OK. The 2D MacOS part seems to be workable. In a first step, it
would probably be sufficient to just intercept copybits calls.

The X part might be slightly problematic; X does not allow mapping
of video RAM directly. The framebuffer is kept in shared RAM through
the MIT shared mem extension. Consider for instance the example
of moving a solid window. Since the RAM based framebuffer
has to be kept up to date, it would be necessary to perform the
operation on it (as is done now, by MacOS). Instead of blitting
the (updated) framebuffer to VRAM, one could instruct X to do
a VRAM -> VRAM copy though (which ought to be virtually 
without cost).

THe performance gain would be due to the reuced traffic
on the PCI/AGP bus. I'm not sure how large the performance
gain would be; at least on remote X connections it would be
quite significant.

Another solution is writing a XFree86 module which could allow
us to map a piece of unused VRAM directly. The module would
then take care of any VRAM -> VRAM blitting.

One should also investigate the possibility to use RGB overlays.
Last I checked, only the YUV color modes were implemented (these
are used to for TV and DVD).

> With MOL running directly on a VC it would be a bit
> harder because as far as I could see the X accellerated video drivers do
> about the same as the MacOS ones so you can't easily call them from MOL.

The VC modes are hard, yes. However, one could use the X11
DGA extensions for fullscreen video instead of the VC implementation.
I've thought about adding this functionality anyway.

So... is there anyone on this list who feels like giving this a shot?

/Samuel