xrandr: fix gamma == 1.0 && sigbits != 8
authorAndy Ritger <aritger@nvidia.com>
Fri, 24 Aug 2012 22:53:08 +0000 (15:53 -0700)
committerAaron Plattner <aplattner@nvidia.com>
Sat, 25 Aug 2012 03:49:11 +0000 (20:49 -0700)
commit90afd01788be7bf19e441a59dca0d8057c5267b1
tree966e126dcbfb7c6a19e63ac845c3168f9aacf602
parent6bf48ae8d8db58ab74182383e54332f120f024c2
xrandr: fix gamma == 1.0 && sigbits != 8

The gamma-correction lookup table managed through XRR[GS]etCrtcGamma is
2^n in size, where 'n' is the number of significant bits in the X Color.
Each element in the gamma-correction lookup table is a 16:16:16 X Color
(i.e., in the range [0,65536) ).  The significant bits of each component
of each element in the lookup table are programmed into the hardware
lookup table.  Meaningful values in the gamma-correction lookup table
are thus in the range [0,2^sigbits), where all values are shifted into
the MSBs (i.e., left shifted by (16 - sigificant bits)).

Signed-off-by: Andy Ritger <aritger@nvidia.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
xrandr.c