In case anyone is interested in poking their cg14/sx in new and
exciting ways :-p
---------- Forwarded message ---------
From: Michael <macallan1888(a)gmail.com>
Date: Tue, 23 Apr 2024 at 07:55
Subject: CG14 and 16bit colour
To: <port-sparc(a)netbsd.org>
Hello,
I did a lot of work on the cgfourteen, sx and xf86-video-suncg14
drivers, one thing I didn't expect was people asking for 8bit
acceleration in X, mostly because with a 4MB cg14 you're limited to
1152x900 in 24bit colour, in 8bit you could go all the way to
1920x1200. So I wrote code for that.
Looking at the headers files, it looks like at least the DAC supports
16bit colour as well, which would allow 1600x1200 in more than 8bit
colour.
Getting SX to deal with 16bit quantities is not difficult, at least for
basic stuff like copy, fill and ROP operations. Xrender would be more
difficult since there is no easy way to separate / re-unite the colour
channels of a 16bit pixel. For 32bit it's trivial, SX has instructions
to split 32bit accesses to four registers, even lets you pick which
byte to take. So we wouldn't get xrender acceleration.
Then again, we don't have that in 8bit either.
The DAC is an Analog Devices ADV7152, and I just found the datasheet -
in 16bit mode we get R5G5B5, nothing unusual here.
That said, cg14 seems to use the DAC only for gamma correction, we
don't mess with it at all even when switching to 8bit, so who knows
what exactly cg14 feeds it when we set pixel mode to 16bit.
Shouldn't be difficult to figure out though.
I guess what I'm getting at is - does anyone particularly care about
this? I don't mind doing this as yet another Just Because I Can(tm)
project but if anyone cares I'd welcome their input.
have fun
Michael