Ideas for accelerated video on MOL (generic PCI device proxy)


Subject: Ideas for accelerated video on MOL (generic PCI device proxy)
From: Michael Clark (michael@metaparadigm.com)
Date: Tue Feb 20 2001 - 01:36:25 MST


Hi Samuel,

I've been thinking a bit about how to implement accelerated video support for
MOL.

I did a little hunting trying to find Apple's published interfaces for display
adapter drivers (*1 is all I could find). I couldn't find info on any standard
interfaces for accelarated video operations and the only public APIs I can find
support a simple memory mapped frame buffer which is what the current
'MacOnLinuxVideo' driver does.

So i'm not sure how accelerated display drivers work under MacOS but I guess
they trap-patch a whole bunch of QuickDraw routines ??. I guess it would be
possible to add support for some simple accelerations like block moves and clear
by patching the relevant Quickdraw routines - but we'd still be missing out on
all the other accelation offered by most modern video cards today (rage128,
etc) - I imagine it would be quite a bit of work to add support for all of their
features this way - especially 3D.

I then thought that one way of doing it would be to implement a 'generic PCI
device proxy' in MOL so that the native video adapter would appear on MOLs PCI
bus. This way the existing MacOS accelerated drivers would be able to be used.
This functionality could also be used for using other types of devices within
MOL (as long as the linux kernel is instructed to not touch them).

The 'generic PCI device proxy' would probe the selected real devices and present
their attributes, ROM images, control registers and memory ranges on the MOL
emulated PCI bus and memory map. Now i'm not sure how hard this would be to
implement as i'm not an expert on PCI - but I think it sounds doable?? I guess
you would already have though of this - how hard would it be to implement? any
ideas anyone??

X is a good example of PCI access from userspace - although i'm not sure if you
could do everything from userspace) ie. interupts. I guess some things would be
quite easy such as memory mapping the ROM's and reproducing standard PCI
attributes and registers but i'm not sure about things such as mapping the PCI
devices physical address space into MOL's address space - someone with a little
more kernel knowledge may have a better idea about this.

Anyway, i'm quite keen to see accelerated video done in MOL and could possibly
fund some of the development. Please let me know if you have any ideas or would
be interested in helping to do this.

*1
http://developer.apple.com/techpubs/hardware/DeviceManagers/displaydevices/displ
aydevices.html

~mc

Michael Clark, . . . . . . . . . . . . michael@metaparadigm.com
Metaparadigm Pte. Ltd. . . . . . . . . . . phone: +65 9645 9612
25F Paterson Road, Singapore 238515 . . . . . fax: +65 733 8825



This archive was generated by hypermail 2a24 : Tue Feb 20 2001 - 01:33:54 MST