Subject: writing a graphics card driver...
To: None <port-sparc@netbsd.org>
From: David C. Myers <myers@iname.com>
List: port-sparc
Date: 12/31/1999 22:49:06
Folks:

I've been goofing around with a Parallax XVideo graphics card on my
Sparc 10.  It's an interesting board -- basically an unaccelerated 24
bit frame buffer, but with a very nice C-Cube MPEG encoding engine on a
daughtercard.  Under Solaris, it does a real mean 640x480x30fps video
capture.  So I'm trying to get Xsun24 to recognize this thing...

...and note that this is my very first kernel programming task ever!

An evening's hacking got my driver ('pllx0' - device number 86)
attaching to the card as the console. 

First question: can I safely ignore all that color map stuff?  (I'm
taking p9100.c and cgfourteen.c as my models, and they both devote a
whole lot of code to color map manipulation.)  I'm perfectly happy
treating the board as 24 bit only, and I believe that color maps only
come into play in 8 bpp mode, but I certainly could be wrong about that.

Second question: How/where do I mmap the board?  This seems to be the
tricky thing, and the sample code varies widely.  What process is
mmap'ing me in the first place?  Xsun24?  I actually thought the kernel
would do it at probe time, but some simple printf's show otherwise. 
Basically, is there some predefined place in memory that a linear 24 bit
framebuffer should occupy, or does it vary by hardware?  And if it does
vary, how would I figure it out?

Sorry if these are lame questions.  As I say, I'm new to this.  Any help
is greatly appreciated.

-David.