All of lore.kernel.org
 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: 8-bit vs. 10-bit palette mode, and LVDS dithering
Date: Mon, 26 Apr 2010 10:29:51 -0400	[thread overview]
Message-ID: <1272292191.25350.53.camel@atropine.boston.devel.redhat.com> (raw)
In-Reply-To: <1272126310.5769.10.camel@pcjc2lap>


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

On Sat, 2010-04-24 at 17:25 +0100, Peter Clifton wrote:

> I noticed an anomaly in the register settings on my GM45, according to
> PIPEBCONF, it is set in 10-bit palette mode, yet the KMS code programs
> the palette registers as if it is in 8-bit mode, and doesn't touch the
> PIPEBGCMAX{RED,GREEN,BLUE} entries for the final interpolation step.
> 
> I've played with it, and I "think" my screen looks nicer with the
> palette reset to 8-bit mode. The KMS driver never touches this register
> normally, and I think it should reset it in intel_display.c's
> intel_crtc_load_lut.

You are almost certainly correct, we should be forcing 8-bit gamma mode.
We're loading the palette as though we are, it's very unlikely to look
right if programmed for 10-bit.

> Ideally, it would be nice to have a higher resolution gamma correction.
> Will it work if I drm_mode_crtc_set_gamma_size(&intel_crtc->base, 129);
> and feed that into the 10-bit linear-interpolated lookup table?

There's a 256-stop assumption hardcoded in a bunch of places, and you
want to be compatible with whatever ramp size userspace passes down.
But, once you fix that, yes, 10-bit linear gamma should work regardless
of the actual pixel depth.  It's definitely something we should fix
though, 30bpp displays won't look any better than 24bpp if we don't do
wider gamma.

Cantiga's 10-bit palette mode is... weird.  It really only works for
TrueColor visuals, and it's a bit counterintuitive that the 129-stop
ramp would be more precise than the 256-stop ramp.  We should probably
only expose it for 30bpp framebuffers (which should then be TrueColor
only in X).

> At what stage is the LVDS dithering involved here.. gamma correction
> probably makes a difference to whether a dither works nicely or not, and
> I'm wondering whether I can tune the dithering process at all.

I suspect gamma applies _after_ truncation and dither, and that dither
doesn't have any knowledge of the gamma ramp and is only trying to
approximate the bits being sourced from the framebuffer.  There's
probably some clever non-monotonic-increasing ramp you could program
that would let one deduce where gamma happens.

- 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-26 14:29 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 [this message]
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

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=1272292191.25350.53.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 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.