[SPARCbook] P9000 Linux Framebuffer "kind of" working

Michael Schwarz mschwarz at multitool.net
Mon Dec 2 13:29:34 CST 2002


I've been hacking my 2.4.18 Linux kernel on my Sparcbook 3 and doing it 
completely without a net.

I decided to see if there were similarities between the P9000 (not supported) 
and the P9100 (supported).  I dug up the old (3.3.6) source code for XFree86 
and took a quick look at the header files for the P9000 X server.  It sure 
looked like many register offsets matched up with those in the framebuffer 
source code in the p9100fb.c module of the Linux kernel.

So, I thought "what the heck?"  I have the source.  I have a working kernel to 
fall back on.  Let's just start hacking.  So, the first thing I did was to 
note that the framebuffer driver appears to use a string match from openprom 
data (I think that is the origin) to decide whether or not to "try" coming 
up.  So I globally replaced (with an appropriately restrictive RE) the 
occurences of "p9100" with "p9000."

On my next boot, the framebuffer failed with the message "p9000: screen depth 
unknown" and it fell back on the really slow "prom" console.

Next step:  Hack.  I found the switch statement that sets type->fb_depth and I 
commented it out, then I added an explicit set to 8 bit color depth.  Reboot.

The console font switched and it became fast!  The frambuffer driver was 
working!  Trouble is, colors weren't working.  I still have black chars on a 
white background.  There is a black square in the upper left of the screen 
where Tux should be.  XFree still can't bring up GUI mode.  Still, I feel 
I've made some progress and wanted to share my joy.  I'm going to try 
tweaking the color depth.  After that, I'll probably go register by register 
through the p9100 linux framebuffer code and see if I can map the use of each 
register over to the code in XFree86's P9000 server.  The only problem being 
X is pretty huge.  The framebuffer code is nice and small, but X is doing a 
lot more.

I must say, it is fun to be really hacking, even if I'm hacking something very 
few people will want to use (most people would give up and buy a much faster 
Intel laptop, but, dang it!  I want a Sparc machine!  Even an old slow 
sparcbook!)

As always, if any of you have the knowledge of the differences between the 
p9000 registers and the p9100 registers, you could save me a lot of pain if 
you would drope me a line.

I must say, even if I get no farther, fast text mode screens are a big 
improvement...

-- 
Michael Schwarz
http://www.multitool.net
mschwarz at multitool.net



More information about the SPARCBook mailing list