Mailinglist Archive: radeonhd (265 mails)

< Previous Next >
[radeonhd] colormap LUT, colour calibration, and XF86-VidModeExtension
  • From: "Yang Zhao" <yang@xxxxxxxxxx>
  • Date: Fri, 2 Jan 2009 01:05:17 -0800
  • Message-id: <40a7b1aa0901020105h1f10fc72o5a1506f68c1e61e8@xxxxxxxxxxxxxx>
Hi all,

I've been looking into the LUT loading code over the last few days so
that Argyll CMS doesn't make a kaleidoscope out of my monitor every
time I try to calibrate it. Patches are available, but I'm still a
little confused about the extensions that allow this.

Here's what I've found:
- colormap data isn't range masked properly when being written to
registers: this means funky colours when >10 bits per channel of
precision is being used in the input
- radeonhd advertises 8-bit colormap precision instead of the supported 10

The question is, how is this precision mismatch supposed to be
handled? Relatedly, what other types of applications would try to call
LoadPalette() or XF86VidModeSetGammaRamp(), specifically with only a
partially defined map?

Currently, my approach is to verify that no rows of the input map has
a value larger than 10 bits, otherwise assuming 16-bit input and
truncating the LS 6 bits. This seems to work fine for xgamma, as the
generated colormap uses the correct advertised precision. As for
Argyll, it seems to always assume 16-bit precision and emit complete
tables, meaning a row with more than 10 bits of data is always
present; XF86-VidModeExtension doesn't provide any facilities for
exposing allowed colormap precision, and I couldn't find how this can
be queried.

Since the older xf86 extensions never seem to be well documented, I
have no idea if this is a valid approach. This heuristic breaks if
only a partial map is given as input, but this is not specifically
disallowed in the spec that is available. It would also break down if
none of the rows contain values larger than 0x3FF when 16bit precision
is assumed, but I'm not sure if this is a practical situation to worry
about.

I've yet to look at what other drivers are doing.

In any case, at least for 24 bit depth mode, colour calibration with
Argyll is working.

--
Yang Zhao
--
To unsubscribe, e-mail: radeonhd+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: radeonhd+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups