[Intel-gfx] rfc: breaking old userspace gamma for 10-bit support

Adam Jackson ajax at redhat.com
Tue Jul 27 17:03:56 CEST 2010


On Fri, 2010-07-23 at 16:29 -0400, Andrew Lutomirski wrote:

> Does that include not breaking DirectColor?  If we program the gamma
> ramp to 129 slots, old userspace submits 256 entries that are not
> monotonic, and we decimate the gamma ramp, we'll display the wrong
> thing.  I have no idea if there are any programs *at all* that do
> that, though.  (If they did, presumably they'd make the entire screen
> look rather odd.)

If I'm remembering this right, it's like this:

GM45 and earlier can only do 10bpc with 10-bit, 129-stop interpolated
LUT.  There is no way to support DirectColor with this, the hardware
assumes that each step is monotonically increasing and will do very
weird things if it's not.  So the DDX driver needs to simply not set up
any DC visuals when run at 10bpc on this hardware.  That's fine though:
DC is a pretty rarely-used feature, and it brings with it all the
colormap-flashing nightmares you remember from pseudocolor.

Ironlake and later can do 30bpc as either 10-bit 1024-stop, or 12-bit
512-stop interpolated.  For the 12-bit ramp you'd need to do the same as
for the GM45 10-bit ramp: DDX driver doesn't set up DC visuals.

Once you've done this, the DRM driver can unambiguously determine what
gamma ramp size to use based on what DDX passes down.  At least in
current RANDR you only get to pick one ramp size.  You could in
principle wire up an output property to change this, but I suggest that
you don't bother.

There are some places in the server where we assume 256 stops, and some
other places where we make the weaker assumption that all CRTCs have the
same ramp size.

Having done all that you'd need to go out to gnome-color-manager and
friends and make sure they don't assume they have 2^n stops of gamma for
an n bpc display.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20100727/2418ce4b/attachment.sig>


More information about the Intel-gfx mailing list