photo of Macallan

Rants & Ramblings

A simple guide to Sun graphics hardware on NetBSD

, , , ,

NetBSD/sparc and sparc64 support quite a few different graphics cards and onboard chips these days, obviously they all have rather different strengths and weaknesses. Let's start with SBus cards:
  • CG3 - a dumb framebuffer with an 8 bit DAC that doesn't even support a hardware cursor. Slow. Avoid unless there really is no alternative. Firmware obeys mode specifiers on newer variants, older boards can switch video modes only by jumper or not at all. No significant heat output.
  • CG6/GX/Lego - a family of accelerated 8 bit graphics boards and onboard chips. Can have 1MB or 2MB of usable video memory, sometimes twice the amount to allow double buffering. The blitter is quite fast for its age, it can certainly keep up with any mach64, especially the Turbo variants. Boards with more than 1MB RAM support quite high resolutions as well. Firmware obeys mode specifiers on most boards. No significant heat output.
  • CG14/SX - VRAM module and onboard rendering engine found in SPARCstation 20 and some SPARCstation 10 models. CG14 is an oversized memory module with a DAC bolted to its side which fits into one of two special memory slots. It's available with 4MB and 8MB VRAM, acceleration relies on the SX chip on the mainboard which is unsupported in NetBSD for lack of documentation. Supports 8bit and 24bit output with a hardware cursor. Since it's sitting on the memory bus it's faster than any unaccelerated SBus board and thus actually usable. Firmware obeys mode specifiers. No significant heat output.
  • ZX/Leo - a monstrosity designed for 3D graphics. Supports up to 1280x1024 in 24 bit. These boards get very hot, especially the TurboZX. It's not very fast as a console, even with acceleration, and X in 24bit isn't supported yet for lack of documentation ( relavent bits about the DAC are missing in available docs ) - beats dumb framebuffers but not by a big margin. Firmware ignores mode specifiers, only tools shipping with Solaris can switch modes.
  • Fujitsu AG-10e - same size as ZX/Leo but a very different beast. Has separate graphics chips for 8bit and 24bit planes and WIDs. Decent speed in both X and the console, gets warm but nowhere near as hot as the ZX/Leo. Currently the only way to get accelerated X in 24bit with an SBus-only machine. Firmware ignores mode specifiers. It's supposed to support DDC2 but I see no evidence of that.

So, these are your options on 32bit Suns. If you want a reasonably fast console and by X you mean 'bunch of xterms' get a CG6. If you need more than 1152x900 get a GX+, TurboGX+, XGX+ etc. - they can go up to 1600x1200. Newer variants all occupy a single SBus slot. The Turbo prefix indicates a model with higher clock speed, the Plus indicates more than 1MB VRAM. Older variants may occupy two slots.
If you need 24bit and have two free SBus slots go find an AG-10e. The problem with this is that it won't obey mode specifiers and we lack documentation to switch video modes ourselves so it's 1152x900 in 66Hz, even though the board itself should support significantly higher resolutions. If you need 24bit in high resolution you'll need an 8MB VRAM module. It will happily switch to pretty much whatever mode you want ( as long as it fits into 8MB VRAM ) - speed isn't great but not too bad.
ZX/Leo, for now at least, should be avoided. As a console it's slower than a CG6 and burns a lot more electricity which is all converted into heat. And it's a two slot beast.

Now to UPA boards:
  • Creator/Creator3D - family of graphics boards, all have 5MB VRAM, the 3D variants have two 5MB buffers and a Z-buffer. These boards can also support higher resolutions by combining their two buffers. Newer boards are significantly faster than old ones ( UPA clock speed ranges from 66MHz up to 120MHz ). All boards support 1280x1024 in 24 bit, Creator3D can go up to 1920x1200.
  • Elite3D - more or less a Creator3D with geometry processors. Can not combine buffers for higher resolutions and for our purposes it's not significantly faster than a last generation Creator3D, it produces a lot more heat though ( nowhere near ZX/Leo levels though )
  • XVR-1000 - next generation Creator3D, with lots more VRAM, its own CPU, loads of texture memory. We support it only as a dumb framebuffer but thanks to its fast interface and even faster VRAM it beats some accelerated PCI graphics boards in X even without any kind of acceleration. Supports whatever your monitor needs and then some. Although it has a huge heat sink it doesn't seem to get all that warm, probably because we run it as a dumb framebuffer.

If you want a fast console get a Creator(3D). If you already have an Elite3D keep it unless you need more than 1280x1024. There is no useful documentation available on the XVR-1000 so we probably won't be able to support acceleration any time soon.
All these boards obey firmware mode specifiers and DDC2.

PCI boards:
  • PGX - a 2MB ATI Rage II, also found on older Ultra 5/10 mainboards. Works alright as an accelerated console but X in 24 bit is limited by video memory.
  • PGX24 - a 4MB ATI Rage Pro, also found on newer Ultra 5/10 mainboards. Faster then a Rage II, more suitable for 24bit thanks to more VRAM, happily runs 1152x900 in 24bit at 75Hz or higher resolutions in 8 bit.
  • PGX64 - an ATI Rage XL, also found on Blade 1x0 mainboards. Should work fine, should be faster than a Rage Pro, but I don't have the hardware. Consider it untested.
  • PGX32 - an 8MB Permedia2. Made by TechSource as Raptor GFX 8P. Firmware is buggy but we have workarounds. Performance as console and in X is decent, image quality in high resolutions may not be all that great though.
  • XVR-100 - a 32MB Radeon RV100. By far the fastest of the bunch as a console, things aren't that clear in X though. Image quality at high resolutions is good, it has a DVI port too.

This one's easy - get an XVR-100. Supported well as a console and in X - it's a bog standard Radeon. All should obey video mode specifiers and support DDC2.

Now there are Suns which have both SBus and UPA or both PCI and UPA.
The Ultra2 can take an AG-10e but the U1E can't - no two SBus slots directly next to each other. If you don't need X in 24bit a TurboGX(+) isn't significantly slower than an old Creator, if you already have a Creator keep it. AG-10e vs. old Creator is more complicated. Creator supports hardware accelerated alpha blending, AG-10e does not ( well, in theory the chip does but only via DMA from main memory which is unsupported ). Creator also has a faster link to the mainboard. AG-10e however has more usable video memory and doesn't use the CPU for image copy operations. Your mileage may vary. In real life there's probably not that much of a noticeable difference.

PCI vs. UPA:
XVR-100 as a console is fastest. In X however, a last generation Creator3D can give it a run for the money, especially in a well equipped Ultra 60. UPA offers much more bandwidth than PCI, even if you stick the XVR-100 into a 66MHz slot ( as you should, the board supports it ) - UPA runs at 120MHz though ( in an U60 at least ), and is 64bit wide. If you need DVI the choice is easy - there's no way to add DVI to any Creator.
In real life you will probably notice differences between the XVR-100 and a Creator3D - sometimes the Creator will be faster, sometimes the XVR-100. If you need many PCI cards you'll probably want a Creator or two ( the U60 has two UPA slots after all ). It's difficult to pick a clear favourite here - Creator3D boards are much faster at image transfers between main memory and VRAM, they're also much faster in alpha blending operations ( think anti-aliased font rendering ) although this is broken in Xorg 1.6 ( works fine in 1.4 though ). The XVR-100 has much more usable off screen memory, VRAM-to-VRAM blits are faster and don't use the CPU, unlike Creator it also supports video overlays. Heat output is no concern with either of them.

In -current NetBSD will let you use pretty much any combination of graphics boards in X ( exceptions are the unaccelerated ones which will work only as console / primary head ).

New year, new graphics hardwareAnother kernel graphics driver

Comments

Chase Rayfieldcb88 Wednesday, April 21, 2010 8:19:52 PM

I've been hunting an AG-10E (ebay surplus etc...) and haven't even seen one for sale. You wouldn't have any idea where I could find one would you? I have two SS10s and wouldn't mind getting graphics going on one of them the other is likely to end up as a headless server/compile box. I posted on the netbsd-sparc mailing list and sun-rescue as well quite some time back but havn't gotten any reply.

Macallan Thursday, April 22, 2010 1:01:44 AM

I read both lists and since I haven't seen one on sale for years I didn't respond. If you want accelerated 24bit graphics and it has to be a 32bit sparc it might be easier to get an SS5 and an S24, or an SS20 with a VSIMM ( and cross fingers that I can figure out how to make the SX sit up and do tricks ) - that's still unaccelerated but since the VSIMM sits on the memory bus it would still be faster than any unaccelerated SBus framebuffer. You may want to check if any of your SS10 is the SX model which can take a VSIMM.

Chase Rayfieldcb88 Thursday, April 22, 2010 6:55:06 PM

Nah neither one is an SX I'll double check when I get back home but I'm pretty sure they aren't. I was speaking with a fellow near me that wants to sell some sun hardware (SS 2 5 and an Ultra 5) fairly reasonably. There is a possibility there is an S24 in the SS5. I supposed the only way to come across an AG-10E these days is if someone is getting rid of their hardware.

I have noticed that many times people have no idea what they are auctioning off on ebay and just put the part number there isn't a part number like that on an AG-10E is there? I found a few ZX cards they seem to have become quite the collectors item however and run about $200+ which is way out of my range.

Macallan Thursday, April 22, 2010 7:44:52 PM

I wouldn't use a ZX even with Solaris - too damn hot, too slow in 2D operations.
I have no part number for the AG-10e - it was made by Fujitsu and sold by Ross with their HyperStations, never by Sun itself IIRC.

Chase Rayfieldcb88 Thursday, April 22, 2010 10:57:34 PM

Yeah I had figured that much out. Thats good to know about the ZX as the SS10 isn't cooled as well as the SS20 anyway from what I understand. I guess that leaves me with poking sun hardware collectors on various forums ;-)

I noticed there are some dual ross hypersparcs on ebay with 1Mb cache even double those are double width though I had almost forgotten that that cache runs half speed which in the case of 142Mhz would still be 70Mhz so they should be quite a bit faster than the SM71... heh I shall return to my drudgery now (lab reports)

Macallan Friday, April 23, 2010 12:49:08 AM

Heck, I have a pair of 125MHz/256kB Colorado B in my SS20 - one alone beats the crap out of my SM71. I haven't found a case yet where the SM71's bigger cache really gives it an edge. Sure, SuperSPARCs get more work done clock-by-clock but the HyperSPARCs win because they're just that much higher clocked.
Be careful with hypersparcs though - anything above 150MHz needs a special BootPROM ( 2.25R ) to work, although the 200MHz ones I've seen on ebay came with a suitable ROM. Newer dual HS modules are single wide too.
On the other end, a 170MHz TurboSPARC barely manages to tie with an SM71. Barely. It's not too bad with an AFX graphics board though.

Chase Rayfieldcb88 Saturday, April 24, 2010 2:48:51 AM

Hmm I had thought the hypersparcs were at a bigger disadvantage than that especially with the half speed cache guess not. Also the 32bit LEON4 should be out soon... those would haul for compiling packages supposedly the eAsic FPGA/ASIC hybrids run upto 1.5Ghz 200Mhz on the plain FPGA dev board though... I guess I need to get a job over the summer :-)

Macallan Saturday, April 24, 2010 12:26:05 PM

In my experience a 110MHz MicroSPARC-II is about as 'fast' as an SM50. Or a Pentium 120 without external cache ( although the Pentium is probably better at floatpoint operations ). A SuperSPARC with external cache ( the SM50 has none ) is much faster. HyperSPARCs are slower at the same clock but as I said - they are available at much higher clock speeds. Seriously, in real life HyperSPARCs are much better than their specs and various synthetic benchmarks suggest.
On the other hand, 64bit SPARCs can run 32bit userland code without changes.

Chase Rayfieldcb88 Thursday, May 13, 2010 8:08:40 PM

Well turns out I have 2 SS2's (one is a dud parted out the other has 64mb ram possibly some bad chips though since it fails memory test but boots fine to RedHat Linux) I think the working one has 2 400Mb drives and a CG6

The SS5 is the low end model... 70Mhz CG6

And a low end ultra 1 with a CG6

And I still have the SS10's I will have to post some shots of my stack later... I loaded netbsd 5.0.1 on the ss5 since it has an internal CD drive which I loaded pkgsrc onto it from dialup untaring took about 3.5 hours :-)



Macallan Thursday, May 13, 2010 10:43:58 PM

At least you got a cg6 in your ss5 - mine came with a cg3 clone and without a CDROM drive but netbooting is easy enough and doesn't waste CDRs.

Chase Rayfieldcb88 Sunday, October 24, 2010 12:41:21 AM

Well I went ahead and bought a ZX as AG-10Es are practically non existent these days.... I found a ZX for about $20 (indeed it is hot :-P)

The install CD works fine with it but once booted up it hangs (zx0: attached to /dev/fb0)I have it in an SS10 with netbsd 4.01 am I missing something here?

I suppose I'll install sol7 for the time being.... have you ever looked at the solaris driver to try and figure anything out about the ZX or even AG-10E for that matter I imagine IDA pro would be very revealing?

Macallan Sunday, October 24, 2010 1:59:33 PM

I'm not sure the zx driver works at all in 4.x or 5.x - someone fixed it in -current a while ago and I added wscons support. I could never figure out how to make it display 24bit colour - the docs I have lack the table that describes how exactly WID encoding works on this monstrosity, all I got was one colour channel.
Also, even though the kernel driver does use the blitter for both character drawing and scrolling it is rather slow, any cg6 is faster.
Finally, Xorg's sunleo driver is horribly bitrotted and last time I checked it didn't support any acceleration at all, even though the hardware could accelerate at least a few xrender ops on top of the usual blitter stuff which may make it worthwhile.
Otherwise, the thing is just too damn hot.

Chase Rayfieldcb88 Monday, October 25, 2010 12:03:19 AM

Ah I will try on Netbsd current then... are you sure you don't have a TZX it isn't that hot that can tell certainly not generating as much heat as a 2Gb Barracuda. Parhaps that is because I don't have any driver using it other than the console... I would install solaris and poke around the card a bit but I can't find a 2.6 CD or iso (which is the last to ship a driver).

I suppose I should look at your wscons and the commits that fixed support to see if its something I could work on I guess its as good a place as any to learn. Free time is non existant though heh. The next thing I'll get is probably a PCMCIA adapter and a 4xUSB card... the think I miss the most is disk space.

Macallan Monday, October 25, 2010 1:28:09 AM

Oh boy - all the Barracudas I had were loud and hot and a TZX is a serious heater. Probably won't melt the case but for me my SS20 with two HS125, a TZX and two disks ( I think one is a 4GB Barracuda ) is a bit too hot for comfort.
About USB - all the PCMCIA-shaped USB cards I have ever seen are 32bit CardBus devices, that is PCI on crack, which will not physically fit into a 16bit only PCMCIA slot. The SBus-to-PCMCIA bridges sold by Sun are 16bit only. Also, USB pretty much requires DMA which doesn't exist on 16bit PCMCIA. Since there are some ISA USB chips there is a chance that someone made a 16bit PCMCIA USB card but that would need some hacking to get it supported, is probably rather hard to find if it exists at all and would put extra load on the CPU for lack of DMA.

Disk space shouldn't be a problem though - any 1" high SCA drive should work, there are fast/wide SCSI cards out there ( make sure you don't get one of the differential ones ) if you need something faster than the onboard SCSI controller or you can get a FibreChannel card - I think there are dual channel SBus cards with up to 2GBit/s per channel and I have seen some fairly cheap FC-AL disks on ebuy. They were probably intended for Blade 1000 and 2000 workstations which use FC internally.
I'm not sure which SBus FC cards NetBSD supports though, I think at least some QLogic ones should work.

Write a comment

New comments have been disabled for this post.