xrandr: use full range for gamma table generation
Calculate gamma table using full [0,65536) range and do not make any
assumptions about relation of gamma table size and significant bits.
Gamma table size has nothing to do with number of significant bits in hardware.
In particular we are dealing now with gamma table that has 17 entries and 8
bit precision, there are other GPUs with 10 bit precision and less than 256
entries using partial linear approximation. Deriving assumed gamma table
significant bits from size of gamma table leads to incorrect calculations and
loss of precision. Also XRandR specification never mentions that gamma tables
need to be power of 2.
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>