intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Adam Jackson <ajax@redhat.com>
To: Peter Clifton <pcjc2@cam.ac.uk>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 3/3] drm/intel: Use 10-bit palette properly, only store 129 entries
Date: Tue, 27 Apr 2010 10:06:28 -0400	[thread overview]
Message-ID: <1272377188.25350.117.camel@atropine.boston.devel.redhat.com> (raw)
In-Reply-To: <1272320658-2157-3-git-send-email-pcjc2@cam.ac.uk>


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

On Mon, 2010-04-26 at 23:24 +0100, Peter Clifton wrote:
> ---
>  drivers/gpu/drm/i915/intel_display.c |   38 ++++++++++++++-------------------
>  drivers/gpu/drm/i915/intel_drv.h     |    2 +-
>  2 files changed, 17 insertions(+), 23 deletions(-)

Nak.

This will break DirectColor visuals in X.  DirectColor assumes that
there's a straight lookup table for each color channel.  If the red
channel of a pixel is 0 in DirectColor, then the actual red value output
will be whatever value is in the 0th slot of the gamma table.  You don't
have 256 stops in 10-bit-gamma mode, so you can't do 8 bits per channel
DirectColor.

Even for TrueColor, which is what normal people expect, this will break
gamma setup entirely.  Userspace is currently hardcoded to use a gamma
size of 256, and:

> @@ -3649,10 +3643,10 @@ static void intel_crtc_gamma_set(struct
> drm_crtc *crtc, u16 *red, u16 *green,
>         struct intel_crtc *intel_crtc = to_intel_crtc(crtc);
>         int i;
>  
> -       if (size != 256)
> +       if (size != 129)
>                 return;

This is why I said gen4 should probably only expose the 129-stop gamma
for 30bpp framebuffers in X, and then only expose TrueColor visuals.

- 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

      reply	other threads:[~2010-04-27 14:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-24 16:25 8-bit vs. 10-bit palette mode, and LVDS dithering Peter Clifton
2010-04-26 14:29 ` Adam Jackson
2010-04-26 21:19   ` [PATCH] drm/intel: Set 8-bit gamma mode for the palette Peter Clifton
2010-04-27 13:53     ` Adam Jackson
2010-04-26 22:22   ` 8-bit vs. 10-bit palette mode, and LVDS dithering Peter Clifton
2010-04-26 22:24     ` [PATCH 1/3] drm/intel: Store full 16 bits of colors passed to gamma LUT Peter Clifton
2010-04-26 22:24     ` [PATCH 2/3] drm/intel: Attempt to use 10-bit gamma palette mode Peter Clifton
2010-04-27  1:09       ` Andrew Lutomirski
2010-04-27  6:44         ` Peter Clifton
2010-04-26 22:24     ` [PATCH 3/3] drm/intel: Use 10-bit palette properly, only store 129 entries Peter Clifton
2010-04-27 14:06       ` Adam Jackson [this message]

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=1272377188.25350.117.camel@atropine.boston.devel.redhat.com \
    --to=ajax@redhat.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=pcjc2@cam.ac.uk \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).