All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adam Jackson <ajax@redhat.com>
To: Andrew Lutomirski <luto@mit.edu>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: rfc: breaking old userspace gamma for 10-bit support
Date: Tue, 27 Jul 2010 11:03:56 -0400	[thread overview]
Message-ID: <1280243037.2353.62.camel@atropine> (raw)
In-Reply-To: <AANLkTi=A1hCtvp9aoGxu7PSJ8ONV6eiA1M33aeAf-DGn@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1825 bytes --]

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

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2010-07-27 15:04 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23 18:00 rfc: breaking old userspace gamma for 10-bit support Andrew Lutomirski
2010-07-23 20:13 ` Eric Anholt
2010-07-23 20:29   ` Andrew Lutomirski
2010-07-26 17:26     ` Eric Anholt
2010-07-27 15:03     ` Adam Jackson [this message]
2011-04-20 19:05       ` Jesse Barnes
2011-04-20 19:14         ` Andrew Lutomirski
2011-04-20 19:38           ` Jesse Barnes
2011-04-20 19:45             ` Andrew Lutomirski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1280243037.2353.62.camel@atropine \
    --to=ajax@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=luto@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.